lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200318165551.GA3082@ubuntu>
Date:   Wed, 18 Mar 2020 17:55:52 +0100
From:   Oscar Carter <oscar.carter@....com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Forest Bond <forest@...ttletooquiet.net>,
        devel@...verdev.osuosl.org, Malcolm Priestley <tvboxspy@...il.com>,
        linux-kernel@...r.kernel.org,
        Gabriela Bittencourt <gabrielabittencourt00@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Oscar Carter <oscar.carter@....com>
Subject: Re: [PATCH] staging: vt6656: Use ARRAY_SIZE instead of hardcoded size

On Tue, Mar 17, 2020 at 01:45:06PM +0300, Dan Carpenter wrote:
> On Sat, Mar 14, 2020 at 05:47:54PM +0100, Oscar Carter wrote:
> > Use ARRAY_SIZE to replace the hardcoded size so we will never have a
> > mismatch.
> >
> > Signed-off-by: Oscar Carter <oscar.carter@....com>
> > ---
> >  drivers/staging/vt6656/main_usb.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
> > index 5e48b3ddb94c..4370941ffc04 100644
> > --- a/drivers/staging/vt6656/main_usb.c
> > +++ b/drivers/staging/vt6656/main_usb.c
> > @@ -23,6 +23,7 @@
> >
> >  #include <linux/etherdevice.h>
> >  #include <linux/file.h>
> > +#include <linux/kernel.h>
> >  #include "device.h"
> >  #include "card.h"
> >  #include "baseband.h"
> > @@ -116,6 +117,7 @@ static int vnt_init_registers(struct vnt_private *priv)
> >  	int ii;
> >  	u8 tmp;
> >  	u8 calib_tx_iq = 0, calib_tx_dc = 0, calib_rx_iq = 0;
> > +	const int n_cck_pwr_tbl = ARRAY_SIZE(priv->cck_pwr_tbl);
>
> Please use ARRAY_SIZE(priv->cck_pwr_tbl) everywhere instead of
> introducing this new variable.
>
Ok, I create a new version of the patch and I resend it.

> regards,
> dan carpenter
>
thanks,

oscar carter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ