]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iio: Use parens with sizeof
authorJoe Simmons-Talbott <joetalbott@gmail.com>
Sun, 17 Jul 2022 15:34:38 +0000 (11:34 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 18 Jul 2022 17:29:29 +0000 (18:29 +0100)
Prefer 'sizeof(var)' over 'sizeof var' as reported by checkpatch.pl.

Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
Link: https://lore.kernel.org/r/20220717153438.10800-1-joetalbott@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-trigger.c

index efc01584b3f9d892bec67208b924edcb5749784d..3e1b1fbc66d070a1824217ec8b730a7cf6e32ced 100644 (file)
@@ -364,7 +364,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);
@@ -553,7 +553,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;