mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: "Enrico Weigelt, metux IT consult" <info@metux.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	X86 ML <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] arch: x86: entry: vdso: fix type conversion on printf() call
Date: Tue, 15 Dec 2020 08:42:13 -0800	[thread overview]
Message-ID: <1297989c-6a9e-0804-82a5-d55cc7502b77@infradead.org> (raw)
In-Reply-To: <CALCETrXhZxyPUcrBaO=mzvANC72uXNBrivo7hGmdkV2bgdFxjw@mail.gmail.com>

On 12/15/20 8:39 AM, Andy Lutomirski wrote:
> On Tue, Dec 15, 2020 at 8:32 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> On 12/15/20 8:03 AM, Enrico Weigelt, metux IT consult wrote:
>>> Fixing the following compiler warning by explicit conversion to long:
>>>
>>> In file included from /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.c:162:0:
>>> /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.h: In function 'extract64':
>>> /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.h:38:52: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
>>>   fprintf(outfile, "static const unsigned char %s[%lu] = {", name, len);
>>>                                                     ^
>>>   CC      mm/filemap.o
>>> In file included from /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.c:166:0:
>>> /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.h: In function 'extract32':
>>> /home/nekrad/src/apu2-dev/pkg/kernel.apu2.git/arch/x86/entry/vdso/vdso2c.h:38:52: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
>>>   fprintf(outfile, "static const unsigned char %s[%lu] = {", name, len);
>>>
>>> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
>>> ---
>>>  arch/x86/entry/vdso/vdso2c.h | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> Hi,
>>
>> size_t is normally printed with %zu.
>> Is there some reason that isn't being used here?
> 
> No.  Want to send a patch?
> 

I was hoping that Enrico would fix this and maybe address your other comment,
although I'm not so sure that I agree with it.

-- 
~Randy


  reply	other threads:[~2020-12-15 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 16:03 Enrico Weigelt, metux IT consult
2020-12-15 16:15 ` Andy Lutomirski
2020-12-15 16:32 ` Randy Dunlap
2020-12-15 16:39   ` Andy Lutomirski
2020-12-15 16:42     ` Randy Dunlap [this message]
2020-12-15 16:55       ` Andy Lutomirski
2020-12-15 18:55         ` Enrico Weigelt, metux IT consult
2020-12-15 18:56 Enrico Weigelt, metux IT consult

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=1297989c-6a9e-0804-82a5-d55cc7502b77@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=info@metux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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

all inboxes | Powered by JetHome®