Messages in this thread Patch in this message | | | Subject | [PATCH 1/4] C6X/megamode-pic: Improve a size determination in init_megamod_pic() | From | SF Markus Elfring <> | Date | Thu, 11 May 2017 15:46:07 +0200 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Thu, 11 May 2017 14:56:57 +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@users.sourceforge.net> --- arch/c6x/platforms/megamod-pic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c index 43afc03e4125..72b5f143c105 100644 --- a/arch/c6x/platforms/megamod-pic.c +++ b/arch/c6x/platforms/megamod-pic.c @@ -205,6 +205,5 @@ static struct megamod_pic * __init init_megamod_pic(struct device_node *np) int mapping[NR_MUX_OUTPUTS]; pr_info("Initializing C64x+ Megamodule PIC\n"); - - pic = kzalloc(sizeof(struct megamod_pic), GFP_KERNEL); + pic = kzalloc(sizeof(*pic), GFP_KERNEL); if (!pic) { -- 2.12.3
| |