From 05a2a17317b48eb16a167c8c2932ba7b3cdee89e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 Sep 2011 18:09:11 -0700 Subject: [PATCH] [SCSI] libsas: fix warnings when checking sata/stp protocol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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] Signed-off-by: Dan Williams Signed-off-by: James Bottomley --- include/scsi/sas.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/scsi/sas.h b/include/scsi/sas.h index 07d504f3981c..cfdbe9501593 100644 --- a/include/scsi/sas.h +++ b/include/scsi/sas.h @@ -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 */ -- GitLab