Skip to content

Commit

Permalink
mac80211: fix debugfs_sta print_mac() warning
Browse files Browse the repository at this point in the history
When print_mac() was marked as __pure to avoid emitting a function
call in pr_debug() scenarios, a warning in this code surfaced since
it relies on the fact that the buffer is modified and doesn't use
the return value. This patch makes it use the return value instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 29, 2008
1 parent 665e8aa commit f3af89d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/mac80211/debugfs_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,13 @@ STA_OPS_WR(agg_status);
void ieee80211_sta_debugfs_add(struct sta_info *sta)
{
struct dentry *stations_dir = sta->local->debugfs.stations;
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mbuf);
u8 *mac;

if (!stations_dir)
return;

print_mac(mac, sta->addr);
mac = print_mac(mbuf, sta->addr);

sta->debugfs.dir = debugfs_create_dir(mac, stations_dir);
if (!sta->debugfs.dir)
Expand Down

0 comments on commit f3af89d

Please sign in to comment.