]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: Remove local defines for %pM and mac address
authorJoe Perches <joe@perches.com>
Sun, 14 Aug 2011 12:16:19 +0000 (12:16 +0000)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 08:31:40 +0000 (16:31 +0800)
Use %pM and mac address directly instead.

(cherry picked from commit 0f9dad10a040fa72c588db46a94c9e96545cc509)
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/bnx2x/bnx2x.h
drivers/net/bnx2x/bnx2x_main.c
drivers/net/bnx2x/bnx2x_sp.c

index 748575f7914af1ca5b404da40b5b35ed9ffda984..189da27a1a787dc4ba93d0451acbdd39801983a0 100644 (file)
@@ -114,10 +114,6 @@ do {                                                                \
                dev_info(&bp->pdev->dev, __fmt, ##__args);       \
 } while (0)
 
-#define BNX2X_MAC_FMT          "%pM"
-#define BNX2X_MAC_PRN_LIST(mac)        (mac)
-
-
 #ifdef BNX2X_STOP_ON_ERROR
 void bnx2x_int_disable(struct bnx2x *bp);
 #define bnx2x_panic() do { \
index 61d3a2021875acf582ac2e7b69c2667c7482c369..8a1833365616ba2e7adc649d3dec512d6b532763 100644 (file)
@@ -9317,9 +9317,8 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
                                val = MF_CFG_RD(bp, func_ext_config[func].
                                                    iscsi_mac_addr_lower);
                                bnx2x_set_mac_buf(iscsi_mac, val, val2);
-                               BNX2X_DEV_INFO("Read iSCSI MAC: "
-                                              BNX2X_MAC_FMT"\n",
-                                              BNX2X_MAC_PRN_LIST(iscsi_mac));
+                               BNX2X_DEV_INFO("Read iSCSI MAC: %pM\n",
+                                              iscsi_mac);
                        } else
                                bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG;
 
@@ -9329,9 +9328,8 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
                                val = MF_CFG_RD(bp, func_ext_config[func].
                                                    fcoe_mac_addr_lower);
                                bnx2x_set_mac_buf(fip_mac, val, val2);
-                               BNX2X_DEV_INFO("Read FCoE L2 MAC to "
-                                              BNX2X_MAC_FMT"\n",
-                                              BNX2X_MAC_PRN_LIST(fip_mac));
+                               BNX2X_DEV_INFO("Read FCoE L2 MAC to %pM\n",
+                                              fip_mac);
 
                        } else
                                bp->flags |= NO_FCOE_FLAG;
@@ -9386,9 +9384,9 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
        if (!is_valid_ether_addr(bp->dev->dev_addr))
                dev_err(&bp->pdev->dev,
                        "bad Ethernet MAC address configuration: "
-                       BNX2X_MAC_FMT", change it manually before bringing up "
+                       "%pM, change it manually before bringing up "
                        "the appropriate network interface\n",
-                       BNX2X_MAC_PRN_LIST(bp->dev->dev_addr));
+                       bp->dev->dev_addr);
 }
 
 static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
index 8d0cdf12b99e30bc4e12814113a1920be4d98a36..97cb91f41d85cd8d66b2fb8215bea868a6b12953 100644 (file)
@@ -708,9 +708,8 @@ static void bnx2x_set_one_mac_e2(struct bnx2x *bp,
        bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_MAC,
                                      &rule_entry->mac.header);
 
-       DP(BNX2X_MSG_SP, "About to %s MAC "BNX2X_MAC_FMT" for "
-                        "Queue %d\n", (add ? "add" : "delete"),
-                        BNX2X_MAC_PRN_LIST(mac), raw->cl_id);
+       DP(BNX2X_MSG_SP, "About to %s MAC %pM for Queue %d\n",
+                        add ? "add" : "delete", mac, raw->cl_id);
 
        /* Set a MAC itself */
        bnx2x_set_fw_mac_addr(&rule_entry->mac.mac_msb,
@@ -802,9 +801,9 @@ static inline void bnx2x_vlan_mac_set_rdata_e1x(struct bnx2x *bp,
        bnx2x_vlan_mac_set_cfg_entry_e1x(bp, o, add, opcode, mac, vlan_id,
                                         cfg_entry);
 
-       DP(BNX2X_MSG_SP, "%s MAC "BNX2X_MAC_FMT" CLID %d CAM offset %d\n",
-                        (add ? "setting" : "clearing"),
-                        BNX2X_MAC_PRN_LIST(mac), raw->cl_id, cam_offset);
+       DP(BNX2X_MSG_SP, "%s MAC %pM CLID %d CAM offset %d\n",
+                        add ? "setting" : "clearing",
+                        mac, raw->cl_id, cam_offset);
 }
 
 /**
@@ -2580,9 +2579,8 @@ static inline void bnx2x_mcast_hdl_pending_add_e2(struct bnx2x *bp,
 
                cnt++;
 
-               DP(BNX2X_MSG_SP, "About to configure "BNX2X_MAC_FMT
-                                " mcast MAC\n",
-                                BNX2X_MAC_PRN_LIST(pmac_pos->mac));
+               DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
+                                pmac_pos->mac);
 
                list_del(&pmac_pos->link);
 
@@ -2703,9 +2701,8 @@ static inline void bnx2x_mcast_hdl_add(struct bnx2x *bp,
 
                cnt++;
 
-               DP(BNX2X_MSG_SP, "About to configure "BNX2X_MAC_FMT
-                                " mcast MAC\n",
-                                BNX2X_MAC_PRN_LIST(mlist_pos->mac));
+               DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
+                                mlist_pos->mac);
        }
 
        *line_idx = cnt;
@@ -2999,9 +2996,8 @@ static inline void bnx2x_mcast_hdl_add_e1h(struct bnx2x *bp,
                bit = bnx2x_mcast_bin_from_mac(mlist_pos->mac);
                BNX2X_57711_SET_MC_FILTER(mc_filter, bit);
 
-               DP(BNX2X_MSG_SP, "About to configure "
-                                BNX2X_MAC_FMT" mcast MAC, bin %d\n",
-                                BNX2X_MAC_PRN_LIST(mlist_pos->mac), bit);
+               DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC, bin %d\n",
+                                mlist_pos->mac, bit);
 
                /* bookkeeping... */
                BIT_VEC64_SET_BIT(o->registry.aprox_match.vec,
@@ -3234,9 +3230,8 @@ static inline int bnx2x_mcast_handle_restore_cmd_e1(
 
                i++;
 
-                 DP(BNX2X_MSG_SP, "About to configure "BNX2X_MAC_FMT
-                                  " mcast MAC\n",
-                                  BNX2X_MAC_PRN_LIST(cfg_data.mac));
+                 DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
+                                  cfg_data.mac);
        }
 
        *rdata_idx = i;
@@ -3271,9 +3266,8 @@ static inline int bnx2x_mcast_handle_pending_cmds_e1(
 
                        cnt++;
 
-                       DP(BNX2X_MSG_SP, "About to configure "BNX2X_MAC_FMT
-                                        " mcast MAC\n",
-                                        BNX2X_MAC_PRN_LIST(pmac_pos->mac));
+                       DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
+                                        pmac_pos->mac);
                }
                break;
 
@@ -3358,9 +3352,8 @@ static inline int bnx2x_mcast_refresh_registry_e1(struct bnx2x *bp,
                                &data->config_table[i].middle_mac_addr,
                                &data->config_table[i].lsb_mac_addr,
                                elem->mac);
-                       DP(BNX2X_MSG_SP, "Adding registry entry for ["
-                                        BNX2X_MAC_FMT"]\n",
-                                  BNX2X_MAC_PRN_LIST(elem->mac));
+                       DP(BNX2X_MSG_SP, "Adding registry entry for [%pM]\n",
+                                        elem->mac);
                        list_add_tail(&elem->link,
                                      &o->registry.exact_match.macs);
                }