libsas: fix warnings when checking sata/stp protocol
PATCH 1/1 libsas: fix warnings when checking sata/stp protocol
Several sas drivers legitimately check the protocol against the union of SAS_PROTOCOL_SATA and SAS_PROTOCOL_STP. Provide a SAS_PROTOCOL_STP_ALL to silence warnings like:
drivers/scsi/pm8001/pm8001_sas.c:438:3: warning: case value ‘5’ not in enumerated type ‘enum sas_protocol’ [-Wswitch] drivers/scsi/mvsas/mv_sas.c:798:2: warning: case value ‘5’ not in enumerated type ‘enum sas_protocol’ [-Wswitch] drivers/scsi/mvsas/mv_sas.c:1783:2: warning: case value ‘5’ not in enumerated type ‘enum sas_protocol’ [-Wswitch] drivers/scsi/mvsas/mv_sas.c:1886:2: warning: case value ‘5’ not in enumerated type ‘enum sas_protocol’ [-Wswitch] drivers/scsi/isci/request.c:3565:2: warning: case value ‘5’ not in enumerated type ‘enum sas_protocol’ [-Wswitch]
--- include/scsi/sas.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/scsi/sas.h +1 -0
@@ -108,6 +108,7 @@ enum sas_protocol {SAS_PROTOCOL_STP =0x04 ,SAS_PROTOCOL_SSP =0x08 ,SAS_PROTOCOL_ALL =0x0E , + SAS_PROTOCOL_STP_ALL = SAS_PROTOCOL_STP|SAS_PROTOCOL_SATA, };/* From the spec; local phys only */
--
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
It's OK for me.
[PATCH] libsas: fix warnings when checking sata/stp protocol
Quoted 8 lines
Several sas drivers legitimately check the protocol against the union of
SAS_PROTOCOL_SATAandSAS_PROTOCOL_STP. Provide aSAS_PROTOCOL_STP_ALLto silence warnings like:
drivers/scsi/pm8001/pm8001_sas.c:438:3: warning: case value '5' not in enumerated type 'enumsas_protocol' [-Wswitch]drivers/scsi/mvsas/mv_sas.c:798:2: warning: case value '5' not in
enumerated
Quoted 2 lines
type 'enum
sas_protocol' [-Wswitch]drivers/scsi/mvsas/mv_sas.c:1783:2: warning: case value '5' not in
enumerated
Quoted 2 lines
type 'enum
sas_protocol' [-Wswitch]drivers/scsi/mvsas/mv_sas.c:1886:2: warning: case value '5' not in
enumerated
Quoted 2 lines
type 'enum
sas_protocol' [-Wswitch]drivers/scsi/isci/request.c:3565:2: warning: case value '5' not in
enumerated
Quoted 14 lines
type 'enum
sas_protocol' [-Wswitch]Cc Xiangliang Yu <[email protected]>Cc Jack Wang <[email protected]>Signed-off-by Dan Williams <[email protected]>--- include/scsi/sas.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)include/scsi/sas.h +0
-0
include/scsi/sas.h enum sas_protocol { · line 111
Quoted 4 lines
include/scsi/sas.h +1
-0@@ -108,6 +108,7 @@ enum sas_protocol {SAS_PROTOCOL_STP =0x04 ,SAS_PROTOCOL_SSP =0x08 ,SAS_PROTOCOL_ALL =0x0E , + SAS_PROTOCOL_STP_ALL =
SAS_PROTOCOL_STP|SAS_PROTOCOL_SATA,
Quoted 8 lines
include/scsi/sas.h +0
-1};/* From the spec; local phys only */ --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