]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: Remove redundant MAC_ARG macro
authorYuvraj Singh Chauhan <ysinghcin@gmail.com>
Fri, 26 Dec 2025 01:30:35 +0000 (07:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jan 2026 12:52:10 +0000 (13:52 +0100)
The MAC_ARG(x) macro is a useless identity macro that just returns its
argument unchanged. It was used alongside the %pM format specifier for
printing MAC addresses, but %pM already handles MAC address formatting
directly without needing any wrapper macro.

This commit removes the macro definition from both:

include/osdep_service.h
include/ieee80211.h

And removes all 6 usages throughout the driver

Signed-off-by: Yuvraj Singh Chauhan <ysinghcin@gmail.com>
Link: https://patch.msgid.link/20251226013035.206284-1-ysinghcin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/core/rtw_wlan_util.c
drivers/staging/rtl8723bs/include/ieee80211.h
drivers/staging/rtl8723bs/include/osdep_service.h

index ef2d92b5588ade8df00d8b7606504a2c49f0dcf1..27eddd22e064f7e57217c75dfc98f8443e180d82 100644 (file)
@@ -930,7 +930,7 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 enqueu
                while ((cam_id = rtw_camid_search(padapter, sta->hwaddr, -1)) >= 0) {
                        netdev_dbg(padapter->pnetdev,
                                   "clear key for addr:%pM, camid:%d\n",
-                                  MAC_ARG(sta->hwaddr), cam_id);
+                                  sta->hwaddr, cam_id);
                        clear_cam_entry(padapter, cam_id);
                        rtw_camid_free(padapter, cam_id);
                }
index dff928d2aa9c4adcc17c1d644173dc959371e66b..e798f35f0f3672a2c81e6d8802d7d3efb2db402e 100644 (file)
@@ -5604,7 +5604,7 @@ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf)
                write_cam(padapter, cam_id, ctrl, addr, pparm->key);
                netdev_dbg(padapter->pnetdev,
                           "set group key camid:%d, addr:%pM, kid:%d, type:%s\n",
-                          cam_id, MAC_ARG(addr), pparm->keyid,
+                          cam_id, addr, pparm->keyid,
                           security_type_str(pparm->algorithm));
        }
 
@@ -5634,7 +5634,7 @@ u8 set_stakey_hdl(struct adapter *padapter, u8 *pbuf)
        psta = rtw_get_stainfo(pstapriv, pparm->addr);
        if (!psta) {
                netdev_dbg(padapter->pnetdev, "%s sta:%pM not found\n",
-                          __func__, MAC_ARG(pparm->addr));
+                          __func__, pparm->addr);
                ret = H2C_REJECTED;
                goto exit;
        }
@@ -5649,14 +5649,14 @@ write_to_cam:
                while ((cam_id = rtw_camid_search(padapter, pparm->addr, -1)) >= 0) {
                        netdev_dbg(padapter->pnetdev,
                                   "clear key for addr:%pM, camid:%d\n",
-                                  MAC_ARG(pparm->addr), cam_id);
+                                  pparm->addr, cam_id);
                        clear_cam_entry(padapter, cam_id);
                        rtw_camid_free(padapter, cam_id);
                }
        } else {
                netdev_dbg(padapter->pnetdev,
                           "set pairwise key camid:%d, addr:%pM, kid:%d, type:%s\n",
-                          cam_id, MAC_ARG(pparm->addr), pparm->keyid,
+                          cam_id, pparm->addr, pparm->keyid,
                           security_type_str(pparm->algorithm));
                ctrl = BIT(15) | ((pparm->algorithm) << 2) | pparm->keyid;
                write_cam(padapter, cam_id, ctrl, pparm->addr, pparm->key);
index ad33c7947348e924e0c56ed23b2bd12f1f8c7432..9ab9fb25ced4dc60bcba142191029a8433d6dc5c 100644 (file)
@@ -617,7 +617,7 @@ s16 rtw_camid_alloc(struct adapter *adapter, struct sta_info *sta, u8 kid)
                                netdev_dbg(adapter->pnetdev,
                                           FUNC_ADPT_FMT " pairwise key with %pM id:%u no room\n",
                                           FUNC_ADPT_ARG(adapter),
-                                          MAC_ARG(sta->hwaddr), kid);
+                                          sta->hwaddr, kid);
                        else
                                netdev_dbg(adapter->pnetdev,
                                           FUNC_ADPT_FMT " group key id:%u no room\n",
index 1098b020920038b1645b468a2da2f4c2bf0e38d9..0f28c904a7147852e4f1509802cdb0ef152a9902 100644 (file)
@@ -506,7 +506,6 @@ join_res:
 
 #define DEFAULT_MAX_SCAN_AGE (15 * HZ)
 #define DEFAULT_FTS 2346
-#define MAC_ARG(x) (x)
 #define IP_ARG(x) (x)
 
 static inline int is_multicast_mac_addr(const u8 *addr)
index 8b1634f4091ec15971bdc6f5209a2c3a46d1b4db..6458ff95ff9df3cb4ff2305e71ccb90a9f58a932 100644 (file)
@@ -91,10 +91,6 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par
 
 #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
 
-#ifndef MAC_ARG
-#define MAC_ARG(x) (x)
-#endif
-
 extern void rtw_free_netdev(struct net_device *netdev);
 
 /* Macros for handling unaligned memory accesses */