lkml.org 
[lkml]   [2023]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: qlge: Remove parenthesis around single condition
On Sat, Mar 11, 2023 at 06:04:09AM -0800, Sumitra Sharma wrote:
> At line #354 checkpatch.pl:
> CHECK: Unnecessary parentheses around 'i == 0x00000114'
> CHECK: Unnecessary parentheses around 'i == 0x00000118'
> CHECK: Unnecessary parenthesis around 'i == 0x00000140'
> CHECK: Unnecessary parentheses around 'i == 0x0000013c'
>

Greg likes the extra parentheses so don't bother sending these sorts of
patches to staging.

> Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
> ---
> drivers/staging/qlge/qlge_dbg.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
> index 66d28358342f..b190a2993033 100644
> --- a/drivers/staging/qlge/qlge_dbg.c
> +++ b/drivers/staging/qlge/qlge_dbg.c
> @@ -351,10 +351,10 @@ static int qlge_get_xgmac_regs(struct qlge_adapter *qdev, u32 *buf,
> /* We're reading 400 xgmac registers, but we filter out
> * several locations that are non-responsive to reads.
> */
> - if ((i == 0x00000114) ||
> - (i == 0x00000118) ||
> - (i == 0x0000013c) ||
> - (i == 0x00000140) ||
> + if (i == 0x00000114 ||
> + i == 0x00000118 ||
> + i == 0x0000013c ||
> + i == 0x00000140 ||

The weirder thing about this code is the indenting. It should be:
[tab][tab][space][space][space][space](i ==.

regards,
dan carpenter

\
 
 \ /
  Last update: 2023-03-27 00:54    [W:0.054 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site