mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Fuqian Huang" <huangfq.daxian@gmail.com>
Cc: <alsa-devel@alsa-project.org>, "Jaroslav Kysela" <perex@perex.cz>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 06/06] sound: isa: gus: fix misuse of %x
Date: Tue, 23 Apr 2019 16:24:15 +0200	[thread overview]
Message-ID: <s5h36m8g5ps.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190421114844.20574-1-huangfq.daxian@gmail.com>

On Sun, 21 Apr 2019 13:48:44 +0200,
Fuqian Huang wrote:
> 
> Pointers should be printed with %p or %px rather than
> cast to long type and printed with %lx.
> Change %lx to %p to print the pointer.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>

IMO, it's better to drop the address printing itself.
We don't want to expose the kernel address any longer.

Care to rewrite the patch?


thanks,

Takashi


> ---
>  sound/isa/gus/gus_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
> index 4ac76f4..63e790f 100644
> --- a/sound/isa/gus/gus_mem.c
> +++ b/sound/isa/gus/gus_mem.c
> @@ -306,7 +306,7 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry,
>  	used = 0;
>  	for (block = alloc->first, i = 0; block; block = block->next, i++) {
>  		used += block->size;
> -		snd_iprintf(buffer, "Block %i at 0x%lx onboard 0x%x size %i (0x%x):\n", i, (long) block, block->ptr, block->size, block->size);
> +		snd_iprintf(buffer, "Block %i at 0x%p onboard 0x%x size %i (0x%x):\n", i, block, block->ptr, block->size, block->size);
>  		if (block->share ||
>  		    block->share_id[0] || block->share_id[1] ||
>  		    block->share_id[2] || block->share_id[3])
> -- 
> 2.11.0
> 
> 

      reply	other threads:[~2019-04-23 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 11:48 Fuqian Huang
2019-04-23 14:24 ` Takashi Iwai [this message]

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=s5h36m8g5ps.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=huangfq.daxian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /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

all inboxes | Powered by JetHome®