diff options
author | Maggie <xmzhang@brocade.com> | 2010-11-29 21:26:32 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:24:17 -0500 |
commit | 50444a340028119ce5ba45d60b4cf44e3e6e1b32 (patch) | |
tree | a1030723aaa84cc07f37f8c3d76766f8a9f1f19a /drivers/scsi/bfa/bfa_fcbuild.c | |
parent | 52f94b6fd0d1ff9d935c52f8a6360834ed871d92 (diff) |
[SCSI] bfa: fix endianess sparse check warnings
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>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcbuild.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcbuild.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/scsi/bfa/bfa_fcbuild.c b/drivers/scsi/bfa/bfa_fcbuild.c index 9c725314b513..322b11e10d67 100644 --- a/drivers/scsi/bfa/bfa_fcbuild.c +++ b/drivers/scsi/bfa/bfa_fcbuild.c | |||
@@ -25,9 +25,9 @@ | |||
25 | * static build functions | 25 | * static build functions |
26 | */ | 26 | */ |
27 | static void fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, | 27 | static void fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, |
28 | u16 ox_id); | 28 | __be16 ox_id); |
29 | static void fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, | 29 | static void fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, |
30 | u16 ox_id); | 30 | __be16 ox_id); |
31 | static struct fchs_s fc_els_req_tmpl; | 31 | static struct fchs_s fc_els_req_tmpl; |
32 | static struct fchs_s fc_els_rsp_tmpl; | 32 | static struct fchs_s fc_els_rsp_tmpl; |
33 | static struct fchs_s fc_bls_req_tmpl; | 33 | static struct fchs_s fc_bls_req_tmpl; |
@@ -157,7 +157,7 @@ fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id) | |||
157 | } | 157 | } |
158 | 158 | ||
159 | void | 159 | void |
160 | fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 160 | fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id) |
161 | { | 161 | { |
162 | memcpy(fchs, &fc_els_req_tmpl, sizeof(struct fchs_s)); | 162 | memcpy(fchs, &fc_els_req_tmpl, sizeof(struct fchs_s)); |
163 | fchs->d_id = (d_id); | 163 | fchs->d_id = (d_id); |
@@ -166,7 +166,7 @@ fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | static void | 168 | static void |
169 | fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 169 | fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id) |
170 | { | 170 | { |
171 | memcpy(fchs, &fc_els_rsp_tmpl, sizeof(struct fchs_s)); | 171 | memcpy(fchs, &fc_els_rsp_tmpl, sizeof(struct fchs_s)); |
172 | fchs->d_id = d_id; | 172 | fchs->d_id = d_id; |
@@ -196,7 +196,7 @@ fc_els_rsp_parse(struct fchs_s *fchs, int len) | |||
196 | } | 196 | } |
197 | 197 | ||
198 | static void | 198 | static void |
199 | fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 199 | fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id) |
200 | { | 200 | { |
201 | memcpy(fchs, &fc_bls_rsp_tmpl, sizeof(struct fchs_s)); | 201 | memcpy(fchs, &fc_bls_rsp_tmpl, sizeof(struct fchs_s)); |
202 | fchs->d_id = d_id; | 202 | fchs->d_id = d_id; |
@@ -206,7 +206,7 @@ fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | |||
206 | 206 | ||
207 | static u16 | 207 | static u16 |
208 | fc_plogi_x_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | 208 | fc_plogi_x_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, |
209 | u16 ox_id, wwn_t port_name, wwn_t node_name, | 209 | __be16 ox_id, wwn_t port_name, wwn_t node_name, |
210 | u16 pdu_size, u8 els_code) | 210 | u16 pdu_size, u8 els_code) |
211 | { | 211 | { |
212 | struct fc_logi_s *plogi = (struct fc_logi_s *) (pld); | 212 | struct fc_logi_s *plogi = (struct fc_logi_s *) (pld); |
@@ -233,7 +233,7 @@ fc_flogi_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | |||
233 | u8 set_npiv, u8 set_auth, u16 local_bb_credits) | 233 | u8 set_npiv, u8 set_auth, u16 local_bb_credits) |
234 | { | 234 | { |
235 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); | 235 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); |
236 | u32 *vvl_info; | 236 | __be32 *vvl_info; |
237 | 237 | ||
238 | memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); | 238 | memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); |
239 | 239 | ||
@@ -267,7 +267,7 @@ fc_flogi_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | |||
267 | 267 | ||
268 | u16 | 268 | u16 |
269 | fc_flogi_acc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | 269 | fc_flogi_acc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, |
270 | u16 ox_id, wwn_t port_name, wwn_t node_name, | 270 | __be16 ox_id, wwn_t port_name, wwn_t node_name, |
271 | u16 pdu_size, u16 local_bb_credits) | 271 | u16 pdu_size, u16 local_bb_credits) |
272 | { | 272 | { |
273 | u32 d_id = 0; | 273 | u32 d_id = 0; |
@@ -392,7 +392,7 @@ fc_prli_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
392 | 392 | ||
393 | u16 | 393 | u16 |
394 | fc_prli_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | 394 | fc_prli_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, |
395 | u16 ox_id, enum bfa_lport_role role) | 395 | __be16 ox_id, enum bfa_lport_role role) |
396 | { | 396 | { |
397 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); | 397 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); |
398 | 398 | ||
@@ -458,7 +458,7 @@ fc_logo_build(struct fchs_s *fchs, struct fc_logo_s *logo, u32 d_id, u32 s_id, | |||
458 | 458 | ||
459 | static u16 | 459 | static u16 |
460 | fc_adisc_x_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | 460 | fc_adisc_x_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, |
461 | u32 s_id, u16 ox_id, wwn_t port_name, | 461 | u32 s_id, __be16 ox_id, wwn_t port_name, |
462 | wwn_t node_name, u8 els_code) | 462 | wwn_t node_name, u8 els_code) |
463 | { | 463 | { |
464 | memset(adisc, '\0', sizeof(struct fc_adisc_s)); | 464 | memset(adisc, '\0', sizeof(struct fc_adisc_s)); |
@@ -480,7 +480,7 @@ fc_adisc_x_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | |||
480 | 480 | ||
481 | u16 | 481 | u16 |
482 | fc_adisc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | 482 | fc_adisc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, |
483 | u32 s_id, u16 ox_id, wwn_t port_name, wwn_t node_name) | 483 | u32 s_id, __be16 ox_id, wwn_t port_name, wwn_t node_name) |
484 | { | 484 | { |
485 | return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name, | 485 | return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name, |
486 | node_name, FC_ELS_ADISC); | 486 | node_name, FC_ELS_ADISC); |
@@ -488,7 +488,7 @@ fc_adisc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | |||
488 | 488 | ||
489 | u16 | 489 | u16 |
490 | fc_adisc_acc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | 490 | fc_adisc_acc_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, |
491 | u32 s_id, u16 ox_id, wwn_t port_name, | 491 | u32 s_id, __be16 ox_id, wwn_t port_name, |
492 | wwn_t node_name) | 492 | wwn_t node_name) |
493 | { | 493 | { |
494 | return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name, | 494 | return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name, |
@@ -592,7 +592,7 @@ fc_rrq_build(struct fchs_s *fchs, struct fc_rrq_s *rrq, u32 d_id, u32 s_id, | |||
592 | 592 | ||
593 | u16 | 593 | u16 |
594 | fc_logo_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | 594 | fc_logo_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, |
595 | u16 ox_id) | 595 | __be16 ox_id) |
596 | { | 596 | { |
597 | struct fc_els_cmd_s *acc = pld; | 597 | struct fc_els_cmd_s *acc = pld; |
598 | 598 | ||
@@ -606,7 +606,7 @@ fc_logo_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
606 | 606 | ||
607 | u16 | 607 | u16 |
608 | fc_ls_rjt_build(struct fchs_s *fchs, struct fc_ls_rjt_s *ls_rjt, u32 d_id, | 608 | fc_ls_rjt_build(struct fchs_s *fchs, struct fc_ls_rjt_s *ls_rjt, u32 d_id, |
609 | u32 s_id, u16 ox_id, u8 reason_code, | 609 | u32 s_id, __be16 ox_id, u8 reason_code, |
610 | u8 reason_code_expl) | 610 | u8 reason_code_expl) |
611 | { | 611 | { |
612 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 612 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
@@ -622,7 +622,7 @@ fc_ls_rjt_build(struct fchs_s *fchs, struct fc_ls_rjt_s *ls_rjt, u32 d_id, | |||
622 | 622 | ||
623 | u16 | 623 | u16 |
624 | fc_ba_acc_build(struct fchs_s *fchs, struct fc_ba_acc_s *ba_acc, u32 d_id, | 624 | fc_ba_acc_build(struct fchs_s *fchs, struct fc_ba_acc_s *ba_acc, u32 d_id, |
625 | u32 s_id, u16 ox_id, u16 rx_id) | 625 | u32 s_id, __be16 ox_id, u16 rx_id) |
626 | { | 626 | { |
627 | fc_bls_rsp_build(fchs, d_id, s_id, ox_id); | 627 | fc_bls_rsp_build(fchs, d_id, s_id, ox_id); |
628 | 628 | ||
@@ -638,7 +638,7 @@ fc_ba_acc_build(struct fchs_s *fchs, struct fc_ba_acc_s *ba_acc, u32 d_id, | |||
638 | 638 | ||
639 | u16 | 639 | u16 |
640 | fc_ls_acc_build(struct fchs_s *fchs, struct fc_els_cmd_s *els_cmd, u32 d_id, | 640 | fc_ls_acc_build(struct fchs_s *fchs, struct fc_els_cmd_s *els_cmd, u32 d_id, |
641 | u32 s_id, u16 ox_id) | 641 | u32 s_id, __be16 ox_id) |
642 | { | 642 | { |
643 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 643 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
644 | memset(els_cmd, 0, sizeof(struct fc_els_cmd_s)); | 644 | memset(els_cmd, 0, sizeof(struct fc_els_cmd_s)); |
@@ -666,7 +666,7 @@ fc_logout_params_pages(struct fchs_s *fc_frame, u8 els_code) | |||
666 | 666 | ||
667 | u16 | 667 | u16 |
668 | fc_tprlo_acc_build(struct fchs_s *fchs, struct fc_tprlo_acc_s *tprlo_acc, | 668 | fc_tprlo_acc_build(struct fchs_s *fchs, struct fc_tprlo_acc_s *tprlo_acc, |
669 | u32 d_id, u32 s_id, u16 ox_id, int num_pages) | 669 | u32 d_id, u32 s_id, __be16 ox_id, int num_pages) |
670 | { | 670 | { |
671 | int page; | 671 | int page; |
672 | 672 | ||
@@ -690,7 +690,7 @@ fc_tprlo_acc_build(struct fchs_s *fchs, struct fc_tprlo_acc_s *tprlo_acc, | |||
690 | 690 | ||
691 | u16 | 691 | u16 |
692 | fc_prlo_acc_build(struct fchs_s *fchs, struct fc_prlo_acc_s *prlo_acc, u32 d_id, | 692 | fc_prlo_acc_build(struct fchs_s *fchs, struct fc_prlo_acc_s *prlo_acc, u32 d_id, |
693 | u32 s_id, u16 ox_id, int num_pages) | 693 | u32 s_id, __be16 ox_id, int num_pages) |
694 | { | 694 | { |
695 | int page; | 695 | int page; |
696 | 696 | ||
@@ -728,7 +728,7 @@ fc_rnid_build(struct fchs_s *fchs, struct fc_rnid_cmd_s *rnid, u32 d_id, | |||
728 | 728 | ||
729 | u16 | 729 | u16 |
730 | fc_rnid_acc_build(struct fchs_s *fchs, struct fc_rnid_acc_s *rnid_acc, u32 d_id, | 730 | fc_rnid_acc_build(struct fchs_s *fchs, struct fc_rnid_acc_s *rnid_acc, u32 d_id, |
731 | u32 s_id, u16 ox_id, u32 data_format, | 731 | u32 s_id, __be16 ox_id, u32 data_format, |
732 | struct fc_rnid_common_id_data_s *common_id_data, | 732 | struct fc_rnid_common_id_data_s *common_id_data, |
733 | struct fc_rnid_general_topology_data_s *gen_topo_data) | 733 | struct fc_rnid_general_topology_data_s *gen_topo_data) |
734 | { | 734 | { |
@@ -788,7 +788,7 @@ fc_rpsc2_build(struct fchs_s *fchs, struct fc_rpsc2_cmd_s *rpsc2, u32 d_id, | |||
788 | 788 | ||
789 | u16 | 789 | u16 |
790 | fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc, | 790 | fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc, |
791 | u32 d_id, u32 s_id, u16 ox_id, | 791 | u32 d_id, u32 s_id, __be16 ox_id, |
792 | struct fc_rpsc_speed_info_s *oper_speed) | 792 | struct fc_rpsc_speed_info_s *oper_speed) |
793 | { | 793 | { |
794 | memset(rpsc_acc, 0, sizeof(struct fc_rpsc_acc_s)); | 794 | memset(rpsc_acc, 0, sizeof(struct fc_rpsc_acc_s)); |
@@ -995,7 +995,7 @@ fc_rrq_rsp_parse(struct fchs_s *fchs, int len) | |||
995 | } | 995 | } |
996 | 996 | ||
997 | u16 | 997 | u16 |
998 | fc_ba_rjt_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, | 998 | fc_ba_rjt_build(struct fchs_s *fchs, u32 d_id, u32 s_id, __be16 ox_id, |
999 | u32 reason_code, u32 reason_expl) | 999 | u32 reason_code, u32 reason_expl) |
1000 | { | 1000 | { |
1001 | struct fc_ba_rjt_s *ba_rjt = (struct fc_ba_rjt_s *) (fchs + 1); | 1001 | struct fc_ba_rjt_s *ba_rjt = (struct fc_ba_rjt_s *) (fchs + 1); |
@@ -1356,7 +1356,7 @@ void | |||
1356 | fc_get_fc4type_bitmask(u8 fc4_type, u8 *bit_mask) | 1356 | fc_get_fc4type_bitmask(u8 fc4_type, u8 *bit_mask) |
1357 | { | 1357 | { |
1358 | u8 index; | 1358 | u8 index; |
1359 | u32 *ptr = (u32 *) bit_mask; | 1359 | __be32 *ptr = (__be32 *) bit_mask; |
1360 | u32 type_value; | 1360 | u32 type_value; |
1361 | 1361 | ||
1362 | /* | 1362 | /* |