[PATCH] mediatek: mt7601u: fix clang -Wformat warning
Joe Perches
joe at perches.com
Fri Jul 15 18:40:36 PDT 2022
On Fri, 2022-07-15 at 17:08 -0700, Justin Stitt wrote:
> On Thu, Jul 14, 2022 at 11:33 PM Joe Perches <joe at perches.com> wrote:
> >
> > On Mon, 2022-07-11 at 14:29 -0700, Justin Stitt wrote:
> > > When building with Clang we encounter this warning:
> > > > drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format
> > > > specifies type 'unsigned char' but the argument has type 'int'
> > > > [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1);
[]
> > I suggest s/%hh/%/ for all the uses here, not just this one.
>
> I also contemplated this change but I think it might be a bit out of
> scope for https://github.com/ClangBuiltLinux/linux/issues/378 -- What
> do you think?
It would not be out of scope.
> It could be argued that every single instance of %hh[dux] should be
> replaced with %[dux].
All the vsprintf ones, but not the scanf ones.
More information about the Linux-mediatek
mailing list