Search Linux Wireless

Re: [PATCH] mediatek: mt7601u: fix clang -Wformat warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2022-07-15 at 17:08 -0700, Justin Stitt wrote:
> On Thu, Jul 14, 2022 at 11:33 PM Joe Perches <joe@xxxxxxxxxxx> 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.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux