[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b36134e-fbf9-5e35-e028-cdc13af185ff@users.sourceforge.net>
Date: Sat, 1 Oct 2016 16:48:05 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-raid@...r.kernel.org, Guoqing Jiang <gqjiang@...e.com>,
Shaohua Li <shli@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 03/15] md-cluster: Improve another size determination in
join()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 1 Oct 2016 11:42:47 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/md/md-cluster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index c28f596..7af27dd 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -823,7 +823,7 @@ static int join(struct mddev *mddev, int nodes)
int ret, ops_rv;
char str[64];
- cinfo = kzalloc(sizeof(struct md_cluster_info), GFP_KERNEL);
+ cinfo = kzalloc(sizeof(*cinfo), GFP_KERNEL);
if (!cinfo)
return -ENOMEM;
--
2.10.0
Powered by blists - more mailing lists