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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Sep 2018 07:57:31 +0200
From:   Hannes Reinecke <hare@...e.com>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Matthew Wilcox <matthew@....cx>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: advansys: Remove unnecessary parentheses

On 9/20/18 10:58 PM, Nathan Chancellor wrote:
> Clang warns when multiple pairs of parentheses are used for a single
> conditional statement.
> 
> drivers/scsi/advansys.c:6451:20: warning: equality comparison with
> extraneous parentheses [-Wparentheses-equality]
>                                  if ((sdtr_data == 0xFF)) {
>                                       ~~~~~~~~~~^~~~~~~
> drivers/scsi/advansys.c:6451:20: note: remove extraneous parentheses
> around the comparison to silence this warning
>                                  if ((sdtr_data == 0xFF)) {
>                                      ~          ^      ~
> drivers/scsi/advansys.c:6451:20: note: use '=' to turn this equality
> comparison into an assignment
>                                  if ((sdtr_data == 0xFF)) {
>                                                 ^~
>                                                 =
> 1 warning generated.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/155
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>   drivers/scsi/advansys.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
> index 713f69033f20..44c96199e00a 100644
> --- a/drivers/scsi/advansys.c
> +++ b/drivers/scsi/advansys.c
> @@ -6448,7 +6448,7 @@ static void AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
>   				sdtr_data =
>   				    AscCalSDTRData(asc_dvc, ext_msg.xfer_period,
>   						   ext_msg.req_ack_offset);
> -				if ((sdtr_data == 0xFF)) {
> +				if (sdtr_data == 0xFF) {
>   
>   					q_cntl |= QC_MSG_OUT;
>   					asc_dvc->init_sdtr &= ~target_id;
> 
Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@...e.com			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ