public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jason Yan <yanaijie@huawei.com>
Cc: martin.petersen@oracle.com, jejb@linux.ibm.com,
	linux-scsi@vger.kernel.org, hare@suse.com, hch@lst.de,
	bvanassche@acm.org, jinpu.wang@cloud.ionos.com,
	damien.lemoal@opensource.wdc.com, john.g.garry@oracle.com
Subject: Re: [PATCH v2 1/3] scsi: libsas: Simplify sas_check_eeds()
Date: Thu, 20 Apr 2023 17:00:31 +0200	[thread overview]
Message-ID: <20230420150031.GA11103@lst.de> (raw)
In-Reply-To: <20230420143339.2769414-2-yanaijie@huawei.com>

On Thu, Apr 20, 2023 at 10:33:37PM +0800, Jason Yan wrote:
> In sas_check_eeds() there is an empty branch. We can reverse the
> test expression and then remove the empty branch. Also the the test
> expression is a little bit complex so it deserves an individual
> function. And make the continuing prototype lines indented after
> the opening parenthesis to follow the standard coding style.
> 
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/scsi/libsas/sas_expander.c | 39 +++++++++++++++---------------
>  1 file changed, 19 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index dc670304f181..70fd4f439664 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -1198,37 +1198,36 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
>  		  sas_route_char(child, child_phy));
>  }
>  
> +static bool sas_eeds_valid(struct domain_device *parent, struct domain_device *child)

Please avoid the overly long line.

  reply	other threads:[~2023-04-20 15:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 14:33 [PATCH v2 0/3] scsi: libsas: remove empty branches and code simplification Jason Yan
2023-04-20 14:33 ` [PATCH v2 1/3] scsi: libsas: Simplify sas_check_eeds() Jason Yan
2023-04-20 15:00   ` Christoph Hellwig [this message]
2023-04-21  1:55     ` Jason Yan
2023-04-20 14:33 ` [PATCH v2 2/3] scsi: libsas: Remove an empty branch in sas_check_parent_topology() Jason Yan
2023-04-20 15:02   ` Christoph Hellwig
2023-04-21  1:57     ` Jason Yan
2023-04-20 14:33 ` [PATCH v2 3/3] scsi: libsas: Simplify sas_check_parent_topology() Jason Yan

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=20230420150031.GA11103@lst.de \
    --to=hch@lst.de \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox