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 2/3] scsi: libsas: Remove an empty branch in sas_check_parent_topology()
Date: Thu, 20 Apr 2023 17:02:01 +0200 [thread overview]
Message-ID: <20230420150201.GB11103@lst.de> (raw)
In-Reply-To: <20230420143339.2769414-3-yanaijie@huawei.com>
On Thu, Apr 20, 2023 at 10:33:38PM +0800, Jason Yan wrote:
> There is an empty "All good" branch in sas_check_parent_topology(). We can
> reverse the test statement and remove the empty branch.
Eww, this code is pretty unreadable (as-is and after the change).
Can you move SAS_EDGE_EXPANDER_DEVICE case into a helper to
make it readabke? That has the extra upside of just being able to
return the error code instead of assigning it to res.
next prev parent reply other threads:[~2023-04-20 15:02 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
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 [this message]
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=20230420150201.GB11103@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