The patch titled
connector: Remove the union declaration
has been added to the -mm tree. Its filename is
connector-exit-notifier-remove-the-union-declaration.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-remove-the-union-declaration-fork.patch
From: Guillaume Thouvenin <[EMAIL PROTECTED]>
This patch removes the ugly union declaration in cn_exit.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_exit.c | 8 ++++----
include/linux/cn_exit.h | 16 ++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)
diff -puN
drivers/connector/cn_exit.c~connector-exit-notifier-remove-the-union-declaration
drivers/connector/cn_exit.c
---
25/drivers/connector/cn_exit.c~connector-exit-notifier-remove-the-union-declaration
Wed Jul 6 13:17:46 2005
+++ 25-akpm/drivers/connector/cn_exit.c Wed Jul 6 13:17:46 2005
@@ -73,9 +73,9 @@ void exit_connector(pid_t pid, pid_t pti
exitmsg = (struct cn_exit_msg *)msg->data;
exitmsg->type = EXIT_CN_MSG_P;
exitmsg->cpu = smp_processor_id();
- exitmsg->u.s.pid = pid;
- exitmsg->u.s.ptid = ptid;
- exitmsg->u.s.code = code;
+ exitmsg->pid = pid;
+ exitmsg->ptid = ptid;
+ exitmsg->code = code;
put_cpu_var(exit_counts);
@@ -107,7 +107,7 @@ static inline void cn_exit_send_status(v
msg->len = CN_EXIT_INFO_SIZE;
exitmsg = (struct cn_exit_msg *)msg->data;
exitmsg->type = EXIT_CN_MSG_S;
- exitmsg->u.status = cn_exit_enable;
+ exitmsg->status = cn_exit_enable;
cn_netlink_send(msg, CN_IDX_EXIT, GFP_KERNEL);
}
diff -puN
include/linux/cn_exit.h~connector-exit-notifier-remove-the-union-declaration
include/linux/cn_exit.h
---
25/include/linux/cn_exit.h~connector-exit-notifier-remove-the-union-declaration
Wed Jul 6 13:17:46 2005
+++ 25-akpm/include/linux/cn_exit.h Wed Jul 6 13:17:46 2005
@@ -41,14 +41,14 @@ struct cn_exit_msg {
int type; /* 0: information about processes
1: exit connector's state */
int cpu; /* ID of the cpu where the exit occurred */
- union {
- struct {
- pid_t pid; /* process ID */
- pid_t ptid; /* process thread ID */
- pid_t code; /* process exit code */
- } s;
- int status;
- } u;
+
+ /* Information about processes */
+ pid_t pid; /* process ID */
+ pid_t ptid; /* process thread ID */
+ pid_t code; /* process exit code */
+
+ /* Exit 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