connection, message: cosmetics
authorDaniel Mack <daniel@zonque.org>
Mon, 27 Oct 2014 11:33:43 +0000 (12:33 +0100)
committerDaniel Mack <daniel@zonque.org>
Mon, 27 Oct 2014 11:33:43 +0000 (12:33 +0100)
Just two tiny cleanups.

Signed-off-by: Daniel Mack <daniel@zonque.org>
connection.c
message.c

index 4bafc6332fdac75b0bdcffb7594e0a65aaf07648..898db9cbebae20c2b42458708ab7583876385e8c 100644 (file)
@@ -118,9 +118,8 @@ exit_dec_reply_count:
 
 static void __kdbus_conn_reply_free(struct kref *kref)
 {
-       struct kdbus_conn_reply *reply = container_of(kref,
-                                                     struct kdbus_conn_reply,
-                                                     kref);
+       struct kdbus_conn_reply *reply =
+               container_of(kref, struct kdbus_conn_reply, kref);
 
        atomic_dec(&reply->reply_dst->reply_count);
        kdbus_conn_unref(reply->reply_dst);
index 8f40314f9edddbcabd1540af2f6c8735201eb3ed..8550d62b030c1ce0cff4191600eb317104edd724 100644 (file)
--- a/message.c
+++ b/message.c
@@ -222,8 +222,7 @@ static int kdbus_msg_scan_items(struct kdbus_conn *conn,
                        if (n > KDBUS_MSG_MAX_FDS)
                                return -EMFILE;
 
-                       kmsg->fds = kcalloc(n, sizeof(struct file *),
-                                           GFP_KERNEL);
+                       kmsg->fds = kcalloc(n, sizeof(*kmsg->fds), GFP_KERNEL);
                        if (!kmsg->fds)
                                return -ENOMEM;