Skip to content

Commit 7de241f

Browse files
arndbKalle Valo
authored andcommitted
wlcore: fix unused function warning
The newly added wlcore_fw_sleep function is called conditionally, which causes a warning without CONFIG_PM: drivers/net/wireless/ti/wlcore/main.c:981:12: error: 'wlcore_fw_sleep' defined but not used [-Werror=unused-function] Instead of trying to keep track of what should be in the #ifdef and what should not, it's easier to mark the top-level suspend/resume functions as __maybe_unused so the compiler can silently drop all the unused code. Fixes: 37bf241 ("wlcore: allow elp during wowlan suspend") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent e477916 commit 7de241f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

drivers/net/wireless/ti/wlcore/acx.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,10 +1129,8 @@ int wl12xx_acx_config_hangover(struct wl1271 *wl);
11291129
int wlcore_acx_average_rssi(struct wl1271 *wl, struct wl12xx_vif *wlvif,
11301130
s8 *avg_rssi);
11311131

1132-
#ifdef CONFIG_PM
11331132
int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable,
11341133
enum rx_filter_action action);
11351134
int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
11361135
struct wl12xx_rx_filter *filter);
1137-
#endif /* CONFIG_PM */
11381136
#endif /* __WL1271_ACX_H__ */

drivers/net/wireless/ti/wlcore/main.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,6 @@ static struct sk_buff *wl12xx_alloc_dummy_packet(struct wl1271 *wl)
13431343
}
13441344

13451345

1346-
#ifdef CONFIG_PM
13471346
static int
13481347
wl1271_validate_wowlan_pattern(struct cfg80211_pkt_pattern *p)
13491348
{
@@ -1715,8 +1714,8 @@ static void wl1271_configure_resume(struct wl1271 *wl, struct wl12xx_vif *wlvif)
17151714
}
17161715
}
17171716

1718-
static int wl1271_op_suspend(struct ieee80211_hw *hw,
1719-
struct cfg80211_wowlan *wow)
1717+
static int __maybe_unused wl1271_op_suspend(struct ieee80211_hw *hw,
1718+
struct cfg80211_wowlan *wow)
17201719
{
17211720
struct wl1271 *wl = hw->priv;
17221721
struct wl12xx_vif *wlvif;
@@ -1810,7 +1809,7 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
18101809
return 0;
18111810
}
18121811

1813-
static int wl1271_op_resume(struct ieee80211_hw *hw)
1812+
static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw)
18141813
{
18151814
struct wl1271 *wl = hw->priv;
18161815
struct wl12xx_vif *wlvif;
@@ -1894,7 +1893,6 @@ static int wl1271_op_resume(struct ieee80211_hw *hw)
18941893

18951894
return 0;
18961895
}
1897-
#endif
18981896

18991897
static int wl1271_op_start(struct ieee80211_hw *hw)
19001898
{

0 commit comments

Comments
 (0)