Skip to content

Commit

Permalink
[SCSI] bfa: fix endianess sparse check warnings
Browse files Browse the repository at this point in the history
First round of fix for the endianess check warnings from make C=2 CF="-D__CHECK_ENDIAN__".

Signed-off-by: Maggie <xmzhang@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Maggie authored and James Bottomley committed Dec 21, 2010
1 parent 52f94b6 commit 50444a3
Show file tree
Hide file tree
Showing 14 changed files with 228 additions and 225 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/bfa/bfa_cb_ioim.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline lun_t
bfad_int_to_lun(u32 luno)
{
union {
u16 scsi_lun[4];
__be16 scsi_lun[4];
lun_t bfa_lun;
} lun;

Expand Down
8 changes: 4 additions & 4 deletions drivers/scsi/bfa/bfa_defs_svc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
struct bfa_iocfc_intr_attr_s {
u8 coalesce; /* enable/disable coalescing */
u8 rsvd[3];
u16 latency; /* latency in microseconds */
u16 delay; /* delay in microseconds */
__be16 latency; /* latency in microseconds */
__be16 delay; /* delay in microseconds */
};

/*
Expand Down Expand Up @@ -743,7 +743,7 @@ struct bfa_port_cfg_s {
u8 qos_enabled; /* qos enabled or not */
u8 cfg_hardalpa; /* is hard alpa configured */
u8 hardalpa; /* configured hard alpa */
u16 maxfrsize; /* maximum frame size */
__be16 maxfrsize; /* maximum frame size */
u8 rx_bbcredit; /* receive buffer credits */
u8 tx_bbcredit; /* transmit buffer credits */
u8 ratelimit; /* ratelimit enabled or not */
Expand Down Expand Up @@ -843,7 +843,7 @@ struct bfa_fcport_fcf_s {
u8 fka_disabled; /* FKA is disabled */
u8 maxsz_verified; /* FCoE max size verified */
u8 fc_map[3]; /* FC map */
u16 vlan; /* FCoE vlan tag/priority */
__be16 vlan; /* FCoE vlan tag/priority */
u32 fka_adv_per; /* FIP ka advert. period */
mac_t mac; /* FCF mac */
};
Expand Down
56 changes: 28 additions & 28 deletions drivers/scsi/bfa/bfa_fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct fchs_s {
u8 df_ctl; /* data field control */
u16 seq_cnt; /* sequence count */

u16 ox_id; /* originator exchange ID */
__be16 ox_id; /* originator exchange ID */
u16 rx_id; /* responder exchange ID */

u32 ro; /* relative offset */
Expand Down Expand Up @@ -316,7 +316,7 @@ enum {
struct fc_plogi_csp_s {
u8 verhi; /* FC-PH high version */
u8 verlo; /* FC-PH low version */
u16 bbcred; /* BB_Credit */
__be16 bbcred; /* BB_Credit */

#ifdef __BIGENDIAN
u8 ciro:1, /* continuously increasing RO */
Expand Down Expand Up @@ -355,12 +355,12 @@ struct fc_plogi_csp_s {
hg_supp:1;
#endif

u16 rxsz; /* recieve data_field size */
__be16 rxsz; /* recieve data_field size */

u16 conseq;
u16 ro_bitmap;
__be16 conseq;
__be16 ro_bitmap;

u32 e_d_tov;
__be32 e_d_tov;
};

/*
Expand Down Expand Up @@ -873,7 +873,7 @@ struct fc_rscn_event_s {
struct fc_rscn_pl_s {
u8 command;
u8 pagelen;
u16 payldlen;
__be16 payldlen;
struct fc_rscn_event_s event[1];
};

Expand Down Expand Up @@ -926,9 +926,9 @@ struct fc_rnid_common_id_data_s {

struct fc_rnid_general_topology_data_s {
u32 vendor_unique[4];
u32 asso_type;
__be32 asso_type;
u32 phy_port_num;
u32 num_attached_nodes;
__be32 num_attached_nodes;
u32 node_mgmt:8;
u32 ip_version:8;
u32 udp_tcp_port_num:16;
Expand Down Expand Up @@ -984,8 +984,8 @@ enum fc_rpsc_op_speed {
};

struct fc_rpsc_speed_info_s {
u16 port_speed_cap; /*! see enum fc_rpsc_speed_cap */
u16 port_op_speed; /*! see enum fc_rpsc_op_speed */
__be16 port_speed_cap; /*! see enum fc_rpsc_speed_cap */
__be16 port_op_speed; /*! see enum fc_rpsc_op_speed */
};

enum link_e2e_beacon_subcmd {
Expand Down Expand Up @@ -1056,9 +1056,9 @@ struct fc_rpsc_acc_s {

struct fc_rpsc2_cmd_s {
struct fc_els_cmd_s els_cmd;
u32 token;
__be32 token;
u16 resvd;
u16 num_pids; /* Number of pids in the request */
__be16 num_pids; /* Number of pids in the request */
struct {
u32 rsvd1:8;
u32 pid:24; /* port identifier */
Expand All @@ -1076,12 +1076,12 @@ enum fc_rpsc2_port_type {
* RPSC2 portInfo entry structure
*/
struct fc_rpsc2_port_info_s {
u32 pid; /* PID */
u16 resvd1;
u16 index; /* port number / index */
u8 resvd2;
u8 type; /* port type N/NL/... */
u16 speed; /* port Operating Speed */
__be32 pid; /* PID */
u16 resvd1;
__be16 index; /* port number / index */
u8 resvd2;
u8 type; /* port type N/NL/... */
__be16 speed; /* port Operating Speed */
};

/*
Expand All @@ -1090,7 +1090,7 @@ struct fc_rpsc2_port_info_s {
struct fc_rpsc2_acc_s {
u8 els_cmd;
u8 resvd;
u16 num_pids; /* Number of pids in the request */
__be16 num_pids; /* Number of pids in the request */
struct fc_rpsc2_port_info_s port_info[1]; /* port information */
};

Expand Down Expand Up @@ -1200,7 +1200,7 @@ struct fcp_cmnd_s {
/*
* !!! additional cdb bytes follows here!!!
*/
u32 fcp_dl; /* bytes to be transferred */
__be32 fcp_dl; /* bytes to be transferred */
};

#define fcp_cmnd_cdb_len(_cmnd) ((_cmnd)->addl_cdb_len * 4 + FCP_CMND_CDB_LEN)
Expand Down Expand Up @@ -1469,7 +1469,7 @@ struct fcgs_gidpn_resp_s {
struct fcgs_rftid_req_s {
u32 rsvd:8;
u32 dap:24; /* port identifier */
u32 fc4_type[8]; /* fc4 types */
__be32 fc4_type[8]; /* fc4 types */
};

/*
Expand Down Expand Up @@ -1764,7 +1764,7 @@ struct fcgs_req_s {

/* Accept Response to GMAL */
struct fcgs_gmal_resp_s {
u32 ms_len; /* Num of entries */
__be32 ms_len; /* Num of entries */
u8 ms_ma[256];
};

Expand Down Expand Up @@ -1856,32 +1856,32 @@ enum fdmi_port_attribute_type {
* FDMI attribute
*/
struct fdmi_attr_s {
u16 type;
u16 len;
__be16 type;
__be16 len;
u8 value[1];
};

/*
* HBA Attribute Block
*/
struct fdmi_hba_attr_s {
u32 attr_count; /* # of attributes */
__be32 attr_count; /* # of attributes */
struct fdmi_attr_s hba_attr; /* n attributes */
};

/*
* Registered Port List
*/
struct fdmi_port_list_s {
u32 num_ports; /* number Of Port Entries */
__be32 num_ports; /* number Of Port Entries */
wwn_t port_entry; /* one or more */
};

/*
* Port Attribute Block
*/
struct fdmi_port_attr_s {
u32 attr_count; /* # of attributes */
__be32 attr_count; /* # of attributes */
struct fdmi_attr_s port_attr; /* n attributes */
};

Expand Down
Loading

0 comments on commit 50444a3

Please sign in to comment.