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: <1445327214.16404.0.camel@suse.de>
Date:	Tue, 20 Oct 2015 09:46:54 +0200
From:	Johannes Thumshirn <jthumshirn@...e.de>
To:	Luis de Bethencourt <luisbg@....samsung.com>,
	linux-kernel@...r.kernel.org
Cc:	JBottomley@...n.com, linux-scsi@...r.kernel.org, hare@...e.de,
	tj@...nel.org, dan.j.williams@...el.com
Subject: Re: [PATCH] scsi: mvsas: fix misleading indentation

On Mon, 2015-10-19 at 21:36 +0100, Luis de Bethencourt wrote:
> Fix a smatch warning:
> drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces
> intended?
> 
> The code is correct, the indention is misleading. When the device is
> not
> ready we want to return SAS_PHY_DOWN. But current indentation makes
> it
> look like we only do so in the else branch of if (mvi_dev).
> 
> Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
> ---
> 
> Hi,
> 
> The aim of this patch is to improve code readability, and at the same
> time
> silence the smatch warning.
> 
> Thanks for the review,
> Luis
> 
>  drivers/scsi/mvsas/mv_sas.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mvsas/mv_sas.c
> b/drivers/scsi/mvsas/mv_sas.c
> index 454536c..b1c5dec 100644
> --- a/drivers/scsi/mvsas/mv_sas.c
> +++ b/drivers/scsi/mvsas/mv_sas.c
> @@ -737,8 +737,8 @@ static int mvs_task_prep(struct sas_task *task,
> struct mvs_info *mvi, int is_tmf
>  			mv_dprintk("device %016llx not ready.\n",
>  				SAS_ADDR(dev->sas_addr));
>  
> -			rc = SAS_PHY_DOWN;
> -			return rc;
> +		rc = SAS_PHY_DOWN;
> +		return rc;
>  	}
>  	tei.port = dev->port->lldd_port;
>  	if (tei.port && !tei.port->port_attached && !tmf) {

Reviewed-by: Johannes Thumshirn <jthumshirn@...e.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ