[SCSI] libsas: Convert sas_proto users to sas_protocol
sparse complains about the mixing of enums in libsas. Since the underlying numeric values of both enums are the same, combine them to get rid of the warning. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:

committed by
James Bottomley

parent
e5a69e27cc
commit
5929faf333
@@ -122,8 +122,8 @@ struct ex_phy {
|
||||
u8 attached_sata_dev:1;
|
||||
u8 attached_sata_ps:1;
|
||||
|
||||
enum sas_proto attached_tproto;
|
||||
enum sas_proto attached_iproto;
|
||||
enum sas_protocol attached_tproto;
|
||||
enum sas_protocol attached_iproto;
|
||||
|
||||
u8 attached_sas_addr[SAS_ADDR_SIZE];
|
||||
u8 attached_phy_id;
|
||||
@@ -191,8 +191,8 @@ struct domain_device {
|
||||
|
||||
struct list_head dev_list_node;
|
||||
|
||||
enum sas_proto iproto;
|
||||
enum sas_proto tproto;
|
||||
enum sas_protocol iproto;
|
||||
enum sas_protocol tproto;
|
||||
|
||||
struct sas_rphy *rphy;
|
||||
|
||||
@@ -245,8 +245,8 @@ struct asd_sas_port {
|
||||
enum sas_class class;
|
||||
u8 sas_addr[SAS_ADDR_SIZE];
|
||||
u8 attached_sas_addr[SAS_ADDR_SIZE];
|
||||
enum sas_proto iproto;
|
||||
enum sas_proto tproto;
|
||||
enum sas_protocol iproto;
|
||||
enum sas_protocol tproto;
|
||||
|
||||
enum sas_oob_mode oob_mode;
|
||||
|
||||
@@ -289,8 +289,8 @@ struct asd_sas_phy {
|
||||
|
||||
int id; /* must be set */
|
||||
enum sas_class class;
|
||||
enum sas_proto iproto;
|
||||
enum sas_proto tproto;
|
||||
enum sas_protocol iproto;
|
||||
enum sas_protocol tproto;
|
||||
|
||||
enum sas_phy_type type;
|
||||
enum sas_phy_role role;
|
||||
@@ -537,7 +537,7 @@ struct sas_task {
|
||||
spinlock_t task_state_lock;
|
||||
unsigned task_state_flags;
|
||||
|
||||
enum sas_proto task_proto;
|
||||
enum sas_protocol task_proto;
|
||||
|
||||
/* Used by the discovery code. */
|
||||
struct timer_list timer;
|
||||
|
@@ -102,13 +102,12 @@ enum sas_dev_type {
|
||||
SATA_PM_PORT= 8,
|
||||
};
|
||||
|
||||
/* Partly from IDENTIFY address frame. */
|
||||
enum sas_proto {
|
||||
SATA_PROTO = 1,
|
||||
SAS_PROTO_SMP = 2, /* protocol */
|
||||
SAS_PROTO_STP = 4, /* protocol */
|
||||
SAS_PROTO_SSP = 8, /* protocol */
|
||||
SAS_PROTO_ALL = 0xE,
|
||||
enum sas_protocol {
|
||||
SAS_PROTOCOL_SATA = 0x01,
|
||||
SAS_PROTOCOL_SMP = 0x02,
|
||||
SAS_PROTOCOL_STP = 0x04,
|
||||
SAS_PROTOCOL_SSP = 0x08,
|
||||
SAS_PROTOCOL_ALL = 0x0E,
|
||||
};
|
||||
|
||||
/* From the spec; local phys only */
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <linux/transport_class.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <scsi/sas.h>
|
||||
|
||||
struct scsi_transport_template;
|
||||
struct sas_rphy;
|
||||
@@ -16,13 +17,6 @@ enum sas_device_type {
|
||||
SAS_FANOUT_EXPANDER_DEVICE,
|
||||
};
|
||||
|
||||
enum sas_protocol {
|
||||
SAS_PROTOCOL_SATA = 0x01,
|
||||
SAS_PROTOCOL_SMP = 0x02,
|
||||
SAS_PROTOCOL_STP = 0x04,
|
||||
SAS_PROTOCOL_SSP = 0x08,
|
||||
};
|
||||
|
||||
static inline int sas_protocol_ata(enum sas_protocol proto)
|
||||
{
|
||||
return ((proto & SAS_PROTOCOL_SATA) ||
|
||||
|
Reference in New Issue
Block a user