From: Stephen Hemminger <stephen.hemminger@gmail.com>
To: Fuqian Huang <huangfq.daxian@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>, netdev@vger.kernel.org
Subject: Re: [PATCH] isdn: hisax: Fix misuse of %x in config.c
Date: Mon, 22 Apr 2019 20:24:01 -0700 [thread overview]
Message-ID: <20190422202327.77a97643@hermes.lan> (raw)
In-Reply-To: <20190423022528.3595-1-huangfq.daxian@gmail.com>
On Tue, 23 Apr 2019 10:25:28 +0800
Fuqian Huang <huangfq.daxian@gmail.com> wrote:
> Pointers should be printed with %p or %px rather than
> cast to (u_long) type and printed with %lX.
> As the function seems to be for debug purpose.
> Change %lX to %px to print the pointer value.
>
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
> ---
> drivers/isdn/hisax/config.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
> index b12e6ca..de96511 100644
> --- a/drivers/isdn/hisax/config.c
> +++ b/drivers/isdn/hisax/config.c
> @@ -1294,9 +1294,9 @@ void HiSax_reportcard(int cardnr, int sel)
> printk(KERN_DEBUG "HiSax: reportcard No %d\n", cardnr + 1);
> printk(KERN_DEBUG "HiSax: Type %s\n", CardType[cs->typ]);
> printk(KERN_DEBUG "HiSax: debuglevel %x\n", cs->debug);
> - printk(KERN_DEBUG "HiSax: HiSax_reportcard address 0x%lX\n",
> - (ulong) & HiSax_reportcard);
> - printk(KERN_DEBUG "HiSax: cs 0x%lX\n", (ulong) cs);
> + printk(KERN_DEBUG "HiSax: HiSax_reportcard address 0x%px\n",
> + HiSax_reportcard);
> + printk(KERN_DEBUG "HiSax: cs 0x%px\n", cs);
> printk(KERN_DEBUG "HiSax: HW_Flags %lx bc0 flg %lx bc1 flg %lx\n",
> cs->HW_Flags, cs->bcs[0].Flag, cs->bcs[1].Flag);
> printk(KERN_DEBUG "HiSax: bcs 0 mode %d ch%d\n",
Why not just remove the useless prints. There is no context where
a pointer has any meaning in userspace. Then again most of ISDN
should probably go to staging anyway....
next prev parent reply other threads:[~2019-04-23 3:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 2:25 [PATCH] isdn: hisax: Fix misuse of %x in config.c Fuqian Huang
2019-04-23 3:24 ` Stephen Hemminger [this message]
2019-04-24 1:33 ` David Miller
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=20190422202327.77a97643@hermes.lan \
--to=stephen.hemminger@gmail.com \
--cc=huangfq.daxian@gmail.com \
--cc=isdn@linux-pingi.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.