Message ID | 20180104114741.37358-4-yanaijie@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Thu, Jan 04, 2018 at 07:47:41PM +0800, Jason Yan wrote:
> + phy->phy->enabled = (phy->linkrate == SAS_PHY_DISABLED) ? 0:1;
missing whitespaces around the ":, but this could just be simplified to:
phy->phy->enabled = (phy->linkrate != SAS_PHY_DISABLED);
Otherwise this looks fine.
On 2018/1/4 20:41, Christoph Hellwig wrote: > On Thu, Jan 04, 2018 at 07:47:41PM +0800, Jason Yan wrote: >> + phy->phy->enabled = (phy->linkrate == SAS_PHY_DISABLED) ? 0:1; > > missing whitespaces around the ":, but this could just be simplified to: > > phy->phy->enabled = (phy->linkrate != SAS_PHY_DISABLED); > That's better, will update. Thanks. > Otherwise this looks fine. > > . >
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 6eab487..c79cfd1 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -293,6 +293,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) phy->phy->minimum_linkrate = dr->pmin_linkrate; phy->phy->maximum_linkrate = dr->pmax_linkrate; phy->phy->negotiated_linkrate = phy->linkrate; + phy->phy->enabled = (phy->linkrate == SAS_PHY_DISABLED) ? 0:1; skip: if (new_phy)