From: Larry Finger <Larry.Finger@lwfinger.net>
To: Hans Wennborg <hans@hanshq.net>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/15] rtlwifi: rtl8192de: fix decimal printf format specifiers prefixed with 0x
Date: Wed, 06 Aug 2014 09:38:54 -0500 [thread overview]
Message-ID: <53E23DFE.7070209@lwfinger.net> (raw)
In-Reply-To: <1407300186-32673-1-git-send-email-hans@hanshq.net>
On 08/05/2014 11:43 PM, Hans Wennborg wrote:
> The prefix suggests the number should be printed in hex, so use
> the %x specifier to do that.
>
> Found by using regex suggested by Joe Perches.
>
> Signed-off-by: Hans Wennborg <hans@hanshq.net>
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/fw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
> index 2317707..66e1760 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
> @@ -234,7 +234,7 @@ static int _rtl92d_fw_init(struct ieee80211_hw *hw)
> rtl_read_byte(rtlpriv, FW_MAC1_READY));
> }
> RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
> - "Polling FW ready fail!! REG_MCUFWDL:0x%08ul\n",
> + "Polling FW ready fail!! REG_MCUFWDL:0x%08lx\n",
> rtl_read_dword(rtlpriv, REG_MCUFWDL));
> return -1;
> }
It would be best to actually build with your patches installed. This one yields
the following warning:
CC [M] drivers/net/wireless/rtlwifi/rtl8192de/fw.o
drivers/net/wireless/rtlwifi/rtl8192de/fw.c: In function ‘_rtl92d_fw_init’:
drivers/net/wireless/rtlwifi/rtl8192de/fw.c:236:2: warning: format ‘%lx’ expects
argument of type ‘long unsigned int’, but argument 5 has type ‘u32’ [-Wformat=]
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
^
The format specifier should be %04x, not %08lx. I have no idea why gcc did not
complain as %08ul is also wrong.
Larry
next prev parent reply other threads:[~2014-08-06 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 4:43 [PATCH 08/15] rtlwifi: rtl8192de: fix decimal printf format specifiers prefixed with 0x Hans Wennborg
2014-08-06 14:38 ` Larry Finger [this message]
2014-08-07 5:26 ` Hans Wennborg
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=53E23DFE.7070209@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=hans@hanshq.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).