Re: [PATCH] staging: rtl8188eu: ARRAY_SIZE instead of sizeof/sizeof used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>

The commit message cannot be empty.  Please include a brief description
of what you're doing in the patch.

Also, if you're redoing a patch you've already sent before, make sure
you mark it as [PATCH v2] and that you include a changelog below the
"---" mark so that reviewers know what's happening without digging
through your previous messages.  And if you're sending multiple patches
for the same driver, make sure to do it as a patch series.

In short, if you haven't read Documentation/SubmittingPatches yet, you
might find it enlightening.

> ---
>  drivers/staging/rtl8188eu/hal/bb_cfg.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> index fa461b4..ff5b15e 100644
> --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
> +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> @@ -158,7 +158,7 @@ static u32 array_agc_tab_1t_8188e[] = {
>  static bool set_baseband_agc_config(struct adapter *adapt)
>  {
>  	u32 i;
> -	u32 arraylen = sizeof(array_agc_tab_1t_8188e)/sizeof(u32);
> +	const u32 arraylen = ARRAY_SIZE(array_agc_tab_1t_8188e);

Neither your subject nor your (non-existent) commit message mentions the
const qualifier.  This should be done in a separate patch, however you
might first want to ponder whether those arraylen variables are needed
at all.

-- 
Best regards,
Michał Kępień
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux