linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>,
	llvm@lists.linux.dev,  oe-kbuild-all@lists.linux.dev,
	 Linux Memory Management List <linux-mm@kvack.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	 Lijo Lazar <lijo.lazar@amd.com>
Subject: Re: [linux-next:master 1323/3381] drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:4: error: format specifies type 'unsigned char' but the argument has type 'int'
Date: Thu, 20 Jun 2024 14:17:45 -0700	[thread overview]
Message-ID: <CAKwvOd=osRnOXcha56Cir+Fh2ichSVmc-n=--JE+F4f1GL=Y7g@mail.gmail.com> (raw)
In-Reply-To: <20240605061734.GD279426@thelio-3990X>

On Tue, Jun 4, 2024 at 11:17 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Wed, Jun 05, 2024 at 06:23:57AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   d97496ca23a2d4ee80b7302849404859d9058bcd
> > commit: 0ea55445554209913a72eab86b60f5788776c4d6 [1323/3381] drm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring
> > config: arm64-randconfig-003-20240605 (https://download.01.org/0day-ci/archive/20240605/202406050622.SmOX6DL6-lkp@intel.com/config)
> > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240605/202406050622.SmOX6DL6-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202406050622.SmOX6DL6-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> > >> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:4: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
> >                     xcc_id, ring->me, ring->pipe, ring->queue);
> >                     ^~~~~~
> > >> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:12: error: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Werror,-Wformat]
> >                     xcc_id, ring->me, ring->pipe, ring->queue);
> >                             ^~~~~~~~
> >    drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:22: error: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Werror,-Wformat]
> >                     xcc_id, ring->me, ring->pipe, ring->queue);
> >                                       ^~~~~~~~~~
> >    drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:34: error: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Werror,-Wformat]
> >                     xcc_id, ring->me, ring->pipe, ring->queue);
> >                                                   ^~~~~~~~~~~
> >    4 errors generated.
>
> For what it's worth, I think that we take care not to enable -Wformat
> with clang versions older than 16 because of this issue, see commit
> b0839b281c42 ("Makefile.extrawarn: re-enable -Wformat for clang; take
> 2") for more information. However, now that I am looking at
> scripts/Makefile.extrawarn, it appears that we only do that for a normal
> build, not W=1? That seems like a potential oversight of that change but
> I am a little fuzzy on the conversation around that and I am not sure
> Nick is around to answer that...

Yeah, unless `-Wformat` was being set explicitly somewhere else when I
wrote b0839b281c42 and has since been removed (-Wformat is part of
-Wall), then it looks like my "old clang" workarounds is only for "not
W=1 builds."  That block just needs to be moved outside of the
corresponding ifneq's else block.

>
> Cheers,
> Nathan



-- 
Thanks,
~Nick Desaulniers


      reply	other threads:[~2024-06-20 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 22:23 kernel test robot
2024-06-05  6:17 ` Nathan Chancellor
2024-06-20 21:17   ` Nick Desaulniers [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='CAKwvOd=osRnOXcha56Cir+Fh2ichSVmc-n=--JE+F4f1GL=Y7g@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=alexander.deucher@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=srinivasan.shanmugam@amd.com \
    /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