Re: [PATCH v2 2/3] scsi: libsas: Remove an empty branch in sas_check_parent_topology()

Jason Yan
2023-04-21T01:57:56Z

On 2023/4/20 23:02, Christoph Hellwig wrote:
> 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.

Sure.