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

Christoph Hellwig
2023-04-20T15:02:09Z

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.