All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Luis de Bethencourt <luisbg@osg.samsung.com>,
	linux-kernel@vger.kernel.org
Cc: JBottomley@odin.com, linux-scsi@vger.kernel.org, hare@suse.de,
	tj@kernel.org, dan.j.williams@intel.com
Subject: Re: [PATCH] scsi: mvsas: fix misleading indentation
Date: Tue, 20 Oct 2015 09:46:54 +0200	[thread overview]
Message-ID: <1445327214.16404.0.camel@suse.de> (raw)
In-Reply-To: <1445287000-1370-1-git-send-email-luisbg@osg.samsung.com>

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@osg.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@suse.de>

      reply	other threads:[~2015-10-20  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 20:36 [PATCH] scsi: mvsas: fix misleading indentation Luis de Bethencourt
2015-10-20  7:46 ` Johannes Thumshirn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445327214.16404.0.camel@suse.de \
    --to=jthumshirn@suse.de \
    --cc=JBottomley@odin.com \
    --cc=dan.j.williams@intel.com \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luisbg@osg.samsung.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.