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]
Message-ID: <alpine.LNX.2.21.1802210932350.8@nippy.intranet>
Date:   Wed, 21 Feb 2018 09:44:45 +1100 (AEDT)
From:   Finn Thain <fthain@...egraphics.com.au>
To:     Arnd Bergmann <arnd@...db.de>
cc:     stable@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Michael Schmitz <schmitzmic@...il.com>,
        "James E.J. Bottomley" <JBottomley@...n.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org
Subject: Re: [4.4-stable 08/22] ncr5380: shut up gcc indentation warning

On Tue, 20 Feb 2018, Arnd Bergmann wrote:

> gcc-6 and higher warn about the way some loops are written in
> the ncr5380 driver:
> 
> drivers/scsi/g_NCR5380.c: In function 'generic_NCR5380_pread':
> drivers/scsi/g_NCR5380.c:541:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
>    while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY);
>    ^~~~~
> drivers/scsi/g_NCR5380.c:544:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'while'
> 
> This was addressed in mainline kernels as part of a rework on commit
> 12150797d064 ("ncr5380: Use runtime register mapping").

Acked-by: Finn Thain <fthain@...egraphics.com.au>

> We don't want the entire patch backported to stable kernels, but we can 
> backport one hunk to get rid of the warning.

Or "backport something equivalent to one hunk".

> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/scsi/g_NCR5380.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
> index f8d2478b11cc..87e081f8a386 100644
> --- a/drivers/scsi/g_NCR5380.c
> +++ b/drivers/scsi/g_NCR5380.c
> @@ -538,7 +538,10 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst,
>  			printk(KERN_ERR "53C400r: Got 53C80_IRQ start=%d, blocks=%d\n", start, blocks);
>  			return -1;
>  		}
> -		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY);
> +		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY)
> +		{
> +			// FIXME - no timeout
> +		}
>  
>  #ifndef SCSI_G_NCR5380_MEM
>  		{
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ