lkml.org 
[lkml]   [2022]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: Use parens with sizeof
Date
Prefer 'sizeof(var)' over 'sizeof var' as reported by checkpatch.pl.

Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
---
drivers/iio/industrialio-trigger.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index f504ed351b3e..88bccb0676c8 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -368,7 +368,7 @@ struct iio_poll_func
va_list vargs;
struct iio_poll_func *pf;

- pf = kmalloc(sizeof *pf, GFP_KERNEL);
+ pf = kmalloc(sizeof(*pf), GFP_KERNEL);
if (pf == NULL)
return NULL;
va_start(vargs, fmt);
@@ -560,7 +560,7 @@ struct iio_trigger *viio_trigger_alloc(struct device *parent,
struct iio_trigger *trig;
int i;

- trig = kzalloc(sizeof *trig, GFP_KERNEL);
+ trig = kzalloc(sizeof(*trig), GFP_KERNEL);
if (!trig)
return NULL;

--
2.35.3
\
 
 \ /
  Last update: 2022-07-17 17:35    [W:0.050 / U:3.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site