The patch titled
fork connector: Remove the union declaration
has been added to the -mm tree. Its filename is
connector-add-a-fork-connector-remove-the-union-declaration-fork.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
connector-exit-notifier-remove-the-union-declaration.patch
connector-add-a-fork-connector.patch
connector-add-a-fork-connector-use-after-free-fix.patch
connector-add-a-fork-connector-remove-the-union-declaration-fork.patch
From: Guillaume Thouvenin <[EMAIL PROTECTED]>
This patch removes the ugly union declaration in cn_fork.h. The code is
cleaner without the union and the price is only four bytes added in the
structure.
Thanks to Alexander Nyberg <[EMAIL PROTECTED]> for reporting this.
Signed-off-by: Guillaume Thouvenin <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/connector/cn_fork.c | 10 +++++-----
include/linux/cn_fork.h | 18 +++++++++---------
2 files changed, 14 insertions(+), 14 deletions(-)
diff -puN
drivers/connector/cn_fork.c~connector-add-a-fork-connector-remove-the-union-declaration-fork
drivers/connector/cn_fork.c
---
25/drivers/connector/cn_fork.c~connector-add-a-fork-connector-remove-the-union-declaration-fork
Wed Jul 6 13:19:00 2005
+++ 25-akpm/drivers/connector/cn_fork.c Wed Jul 6 13:19:00 2005
@@ -72,10 +72,10 @@ void fork_connector(pid_t ppid, pid_t pt
forkmsg = (struct cn_fork_msg *)msg->data;
forkmsg->type = FORK_CN_MSG_P;
forkmsg->cpu = smp_processor_id();
- forkmsg->u.s.ppid = ppid;
- forkmsg->u.s.ptid = ptid;
- forkmsg->u.s.cpid = cpid;
- forkmsg->u.s.ctid = ctid;
+ forkmsg->ppid = ppid;
+ forkmsg->ptid = ptid;
+ forkmsg->cpid = cpid;
+ forkmsg->ctid = ctid;
put_cpu_var(fork_counts);
@@ -107,7 +107,7 @@ static inline void cn_fork_send_status(v
msg->len = CN_FORK_INFO_SIZE;
forkmsg = (struct cn_fork_msg *)msg->data;
forkmsg->type = FORK_CN_MSG_S;
- forkmsg->u.status = cn_fork_enable;
+ forkmsg->status = cn_fork_enable;
cn_netlink_send(msg, CN_IDX_FORK, GFP_KERNEL);
}
diff -puN
include/linux/cn_fork.h~connector-add-a-fork-connector-remove-the-union-declaration-fork
include/linux/cn_fork.h
---
25/include/linux/cn_fork.h~connector-add-a-fork-connector-remove-the-union-declaration-fork
Wed Jul 6 13:19:00 2005
+++ 25-akpm/include/linux/cn_fork.h Wed Jul 6 13:19:00 2005
@@ -49,15 +49,15 @@ struct cn_fork_msg {
int type; /* 0: information about processes
1: fork connector's state */
int cpu; /* ID of the cpu where the fork occurred */
- union {
- struct {
- pid_t ppid; /* parent process ID */
- pid_t ptid; /* parent thread ID */
- pid_t cpid; /* child process ID */
- pid_t ctid; /* child thread ID */
- } s;
- int status;
- } u;
+
+ /* Information about processes */
+ pid_t ppid; /* parent process ID */
+ pid_t ptid; /* parent thread ID */
+ pid_t cpid; /* child process ID */
+ pid_t ctid; /* child thread ID */
+
+ /* fork connector's state */
+ int status;
};
/* Code above is only inside the kernel */
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html