From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AE6FC10F14 for ; Tue, 23 Apr 2019 14:24:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0195520674 for ; Tue, 23 Apr 2019 14:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727939AbfDWOYQ (ORCPT ); Tue, 23 Apr 2019 10:24:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:41048 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727666AbfDWOYQ (ORCPT ); Tue, 23 Apr 2019 10:24:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 46147AC44; Tue, 23 Apr 2019 14:24:15 +0000 (UTC) Date: Tue, 23 Apr 2019 16:24:15 +0200 Message-ID: From: Takashi Iwai To: "Fuqian Huang" Cc: , "Jaroslav Kysela" , Subject: Re: [PATCH v2 06/06] sound: isa: gus: fix misuse of %x In-Reply-To: <20190421114844.20574-1-huangfq.daxian@gmail.com> References: <20190421114844.20574-1-huangfq.daxian@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2 06/06] sound: isa: gus: fix misuse of %x Date: Tue, 23 Apr 2019 16:24:15 +0200 Message-ID: References: <20190421114844.20574-1-huangfq.daxian@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20190421114844.20574-1-huangfq.daxian@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Fuqian Huang Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org 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 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 > >