bnx2x: define fields of struct cfc_del_event_data as little-endian
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 2 Mar 2016 12:47:09 +0000 (13:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Mar 2016 18:31:56 +0000 (13:31 -0500)
There were no missing endianness conversions in this case, but the
fields of struct cfc_del_event_data should be defined as little-endian
to get rid of the ugly (__force __le32) casts.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index 10585916a4bba382f936703b275b877a148580f7..a24909a3ed72404499a337648b5ef6b9dc8d4454 100644 (file)
@@ -4896,9 +4896,9 @@ struct c2s_pri_trans_table_entry {
  * cfc delete event data
  */
 struct cfc_del_event_data {
-       u32 cid;
-       u32 reserved0;
-       u32 reserved1;
+       __le32 cid;
+       __le32 reserved0;
+       __le32 reserved1;
 };
 
 
index 0e0bcbdb84d1cf2cbd4733593049365cdadcd09a..9f5716aea1802680d7747b8519a618d8cc8b3379 100644 (file)
@@ -5501,8 +5501,7 @@ static void bnx2x_eq_int(struct bnx2x *bp)
                         */
 
                        /* elem CID originates from FW; actually LE */
-                       cid = SW_CID((__force __le32)
-                                    elem->message.data.cfc_del_event.cid);
+                       cid = SW_CID(elem->message.data.cfc_del_event.cid);
 
                        DP(BNX2X_MSG_SP,
                           "got delete ramrod for MULTI[%d]\n", cid);
index 55fcc216bd35c8384e887451f876f30d8ab5528c..632daff117d305a822f95cc1bcd84b47437b2334 100644 (file)
@@ -1747,8 +1747,7 @@ int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem)
 
        switch (opcode) {
        case EVENT_RING_OPCODE_CFC_DEL:
-               cid = SW_CID((__force __le32)
-                            elem->message.data.cfc_del_event.cid);
+               cid = SW_CID(elem->message.data.cfc_del_event.cid);
                DP(BNX2X_MSG_IOV, "checking cfc-del comp cid=%d\n", cid);
                break;
        case EVENT_RING_OPCODE_CLASSIFICATION_RULES: