lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR03MB5196669352540FF7F71AC4A8F9D20@DM6PR03MB5196.namprd03.prod.outlook.com>
Date:   Mon, 4 Jan 2021 14:13:36 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     linux-spi <linux-spi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: RE: [PATCH] spi: stm32: update dev_dbg() print format for SPI params



> -----Original Message-----
> From: Andy Shevchenko <andy.shevchenko@...il.com>
> Sent: Monday, January 4, 2021 3:51 PM
> To: Ardelean, Alexandru <alexandru.Ardelean@...log.com>
> Cc: linux-spi <linux-spi@...r.kernel.org>; Linux Kernel Mailing List <linux-
> kernel@...r.kernel.org>; Mark Brown <broonie@...nel.org>; Stephen Rothwell
> <sfr@...b.auug.org.au>
> Subject: Re: [PATCH] spi: stm32: update dev_dbg() print format for SPI params
> 
> [External]
> 
> On Mon, Jan 4, 2021 at 10:55 AM Alexandru Ardelean
> <alexandru.ardelean@...log.com> wrote:
> >
> > With the introduction of the 'include/uapi/linux/spi/spi.h' header,
> > the type of the macros are enforced to 'unsigned long int' via the
> > _BITUL() macro.
> >
> > This causes some -Wformat warnings in the spi-stm32 driver.
> > This patch changes the printf() specifiers from '%d' to '%lu' to
> > accommodate for this change.
> >
> > Fixes: f7005142dace ("spi: uapi: unify SPI modes into a single spi.h
> > header")
> > Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> 
> LKP also reported this before.
> 

Ack;
Will add it

> ...
> 
> > -       dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
> > +       dev_dbg(spi->dev, "cpol=%lu cpha=%lu lsb_first=%lu
> > + cs_high=%lu\n",
> >                 spi_dev->mode & SPI_CPOL,
> >                 spi_dev->mode & SPI_CPHA,
> >                 spi_dev->mode & SPI_LSB_FIRST,
> 
> Wouldn't the output be a bit awful with all these?
> 
> I think the proper fix is to add !! to each bit mask.

Fine by me

> 
> --
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ