Revert "notify: set item->size"
authorDaniel Mack <daniel@zonque.org>
Wed, 22 Oct 2014 09:52:04 +0000 (11:52 +0200)
committerDaniel Mack <daniel@zonque.org>
Wed, 22 Oct 2014 09:55:48 +0000 (11:55 +0200)
This reverts commit b62c3ed2b7bed76935a57a9a65e7bba63602b4c4.

m->msg.items[0].size is already set from kdbus_kmsg_new(), so this
is unnecessary. Furthermode, we need to ALIGN8() the item size, which
kdbus_kmsg_new() also does for us already.

notify.c

index ca7f408a8312aa7b76b0aa0dce5f07f8a3d57e65..c68add64cbf0be448f15d97632b52d67194f927a 100644 (file)
--- a/notify.c
+++ b/notify.c
@@ -49,7 +49,6 @@ static int kdbus_notify_reply(struct kdbus_bus *bus, u64 id,
        kmsg->msg.src_id = KDBUS_SRC_ID_KERNEL;
        kmsg->msg.payload_type = KDBUS_PAYLOAD_KERNEL;
        kmsg->msg.cookie_reply = cookie;
-       kmsg->msg.items[0].size = KDBUS_ITEM_HEADER_SIZE;
        kmsg->msg.items[0].type = msg_type;
 
        spin_lock(&bus->notify_lock);
@@ -124,7 +123,6 @@ int kdbus_notify_name_change(struct kdbus_bus *bus, u64 type,
        kmsg->notify_type = type;
        kmsg->notify_old_id = old_id;
        kmsg->notify_new_id = new_id;
-       kmsg->msg.items[0].size = extra_size;
        kmsg->msg.items[0].type = type;
        kmsg->msg.items[0].name_change.old_id.id = old_id;
        kmsg->msg.items[0].name_change.old_id.flags = old_flags;
@@ -176,7 +174,6 @@ int kdbus_notify_id_change(struct kdbus_bus *bus, u64 type, u64 id, u64 flags)
                BUG();
        }
 
-       kmsg->msg.items[0].size = sizeof(struct kdbus_notify_id_change);
        kmsg->msg.items[0].type = type;
        kmsg->msg.items[0].id_change.id = id;
        kmsg->msg.items[0].id_change.flags = flags;