]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: rc/ite-cir: fix smatch warning
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sun, 3 Nov 2019 11:23:34 +0000 (12:23 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Nov 2019 06:26:33 +0000 (07:26 +0100)
Use sizeof instead of ARRAY_SIZE to fix this smatch warning:

drivers/media/rc/ite-cir.c:385 ite_tx_ir() warn: calling memset(x, y, ARRAY_SIZE());

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/rc/ite-cir.c

index 3ab6cec0dc3bc0d035cd72df682a5ce1c4cad6e9..07667c04c1d2b4f0e05e10c4bc3fdfa6a80dddc3 100644 (file)
@@ -382,7 +382,7 @@ static int ite_tx_ir(struct rc_dev *rcdev, unsigned *txbuf, unsigned n)
        ite_dbg("%s called", __func__);
 
        /* clear the array just in case */
        ite_dbg("%s called", __func__);
 
        /* clear the array just in case */
-       memset(last_sent, 0, ARRAY_SIZE(last_sent));
+       memset(last_sent, 0, sizeof(last_sent));
 
        spin_lock_irqsave(&dev->lock, flags);
 
 
        spin_lock_irqsave(&dev->lock, flags);