2012-02-14 14:41:05

by Danny Kukawka

[permalink] [raw]
Subject: [PATCH] pm8001: fix enum checks

Fix for:
drivers/scsi/pm8001/pm8001_hwi.c: In function ‘hw_event_sas_phy_up’:
drivers/scsi/pm8001/pm8001_hwi.c:2932:32: warning: comparison between
‘enum sas_device_type’ and ‘enum sas_dev_type’ [-Wenum-compare]
drivers/scsi/pm8001/pm8001_hwi.c:2934:37: warning: comparison between
‘enum sas_device_type’ and ‘enum sas_dev_type’ [-Wenum-compare]

Changed SAS_END_DEV to SAS_END_DEVICE and NO_DEVICE with
SAS_PHY_UNUSED.

Signed-off-by: Danny Kukawka <[email protected]>
---
drivers/scsi/pm8001/pm8001_hwi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index b7b92f7..46fd7219 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -2929,9 +2929,9 @@ hw_event_sas_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
phy->phy_type |= PORT_TYPE_SAS;
phy->identify.device_type = deviceType;
phy->phy_attached = 1;
- if (phy->identify.device_type == SAS_END_DEV)
+ if (phy->identify.device_type == SAS_END_DEVICE)
phy->identify.target_port_protocols = SAS_PROTOCOL_SSP;
- else if (phy->identify.device_type != NO_DEVICE)
+ else if (phy->identify.device_type != SAS_PHY_UNUSED)
phy->identify.target_port_protocols = SAS_PROTOCOL_SMP;
phy->sas_phy.oob_mode = SAS_OOB_MODE;
sas_ha->notify_phy_event(&phy->sas_phy, PHYE_OOB_DONE);
--
1.7.7.3


2012-02-15 01:05:13

by Jack Wang

[permalink] [raw]
Subject: RE: [PATCH] pm8001: fix enum checks

Thanks for fix.
Acked-by: Jack Wang <[email protected]>

[PATCH] pm8001: fix enum checks
>
> Fix for:
> drivers/scsi/pm8001/pm8001_hwi.c: In function 'hw_event_sas_phy_up':
> drivers/scsi/pm8001/pm8001_hwi.c:2932:32: warning: comparison between
> 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]
> drivers/scsi/pm8001/pm8001_hwi.c:2934:37: warning: comparison between
> 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]
>
> Changed SAS_END_DEV to SAS_END_DEVICE and NO_DEVICE with
> SAS_PHY_UNUSED.
>
> Signed-off-by: Danny Kukawka <[email protected]>
> ---
> drivers/scsi/pm8001/pm8001_hwi.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c
> b/drivers/scsi/pm8001/pm8001_hwi.c
> index b7b92f7..46fd7219 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -2929,9 +2929,9 @@ hw_event_sas_phy_up(struct pm8001_hba_info
*pm8001_ha,
> void *piomb)
> phy->phy_type |= PORT_TYPE_SAS;
> phy->identify.device_type = deviceType;
> phy->phy_attached = 1;
> - if (phy->identify.device_type == SAS_END_DEV)
> + if (phy->identify.device_type == SAS_END_DEVICE)
> phy->identify.target_port_protocols = SAS_PROTOCOL_SSP;
> - else if (phy->identify.device_type != NO_DEVICE)
> + else if (phy->identify.device_type != SAS_PHY_UNUSED)
> phy->identify.target_port_protocols = SAS_PROTOCOL_SMP;
> phy->sas_phy.oob_mode = SAS_OOB_MODE;
> sas_ha->notify_phy_event(&phy->sas_phy, PHYE_OOB_DONE);
> --
> 1.7.7.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html