From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: David Miller <davem@davemloft.net>,
joe@perches.com, netdev@vger.kernel.org,
Harvey Harrison <harvey.harrison@gmail.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix debugfs_sta print_mac() warning
Date: Thu, 21 Feb 2008 11:22:12 +0100 [thread overview]
Message-ID: <1203589332.17534.150.camel@johannes.berg> (raw)
In-Reply-To: <1203588993.20345.27.camel@brick> (sfid-20080221_101622_275557_F35DFAB3)
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>
---
net/mac80211/debugfs_sta.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- everything.orig/net/mac80211/debugfs_sta.c 2008-02-21 11:17:48.000000000 +0100
+++ everything/net/mac80211/debugfs_sta.c 2008-02-21 11:17:59.000000000 +0100
@@ -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)
parent reply other threads:[~2008-02-21 10:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1203588993.20345.27.camel@brick>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203589332.17534.150.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=harvey.harrison@gmail.com \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox