[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56c51505-0ac3-7c59-6ba3-768dd3a675da@users.sourceforge.net>
Date: Thu, 18 Jan 2018 22:15:40 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: kernel-janitors@...r.kernel.org,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
Shenwei Wang <shenwei.wang@...escale.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/3] irq-imx-gpcv2: Improve a size determination in
imx_gpcv2_irqchip_init()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 18 Jan 2018 21:25:13 +0100
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.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/irqchip/irq-imx-gpcv2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c
index f08fcbb46b1b..e62f22c84112 100644
--- a/drivers/irqchip/irq-imx-gpcv2.c
+++ b/drivers/irqchip/irq-imx-gpcv2.c
@@ -224,7 +224,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
return -ENXIO;
}
- cd = kzalloc(sizeof(struct gpcv2_irqchip_data), GFP_KERNEL);
+ cd = kzalloc(sizeof(*cd), GFP_KERNEL);
if (!cd)
return -ENOMEM;
--
2.15.1
Powered by blists - more mailing lists