[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <995aab89-a49a-fcf4-6d70-3b55580770e5@users.sourceforge.net>
Date: Sat, 6 May 2017 10:39:22 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: cluster-devel@...hat.com,
Christine Caulfield <ccaulfie@...hat.com>,
David Teigland <teigland@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 03/10] dlm: Improve a size determination in table_seq_start()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 6 May 2017 08:34:27 +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>
---
fs/dlm/debug_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index 551e0f8dbe0d..fa08448e35dd 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -435,7 +435,7 @@ static void *table_seq_start(struct seq_file *seq, loff_t *pos)
if (bucket >= ls->ls_rsbtbl_size)
return NULL;
- ri = kzalloc(sizeof(struct rsbtbl_iter), GFP_NOFS);
+ ri = kzalloc(sizeof(*ri), GFP_NOFS);
if (!ri)
return NULL;
if (n == 0)
--
2.12.2
Powered by blists - more mailing lists