lkml.org 
[lkml]   [2021]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] mfd: intel_quark_i2c_gpio: Don't play dirty trick with const
On Fri, 26 Mar 2021, Lee Jones wrote:

> On Fri, 26 Mar 2021, Andy Shevchenko wrote:
>
> > As Linus rightfully noticed, the driver plays dirty trick with const,
> > i.e. it assigns a place holder data structure to the const field
> > in the MFD cell and then drops the const by explicit casting. This is
> > not how it should be.
> >
> > Assign local pointers of the cell and resource to the respective
> > non-const place holders in the intel_quark_i2c_setup() and
> > intel_quark_gpio_setup().
> >
> > Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > v2: eliminated bar parameter (Lee)
> > drivers/mfd/intel_quark_i2c_gpio.c | 26 ++++++++++++--------------
> > 1 file changed, 12 insertions(+), 14 deletions(-)
>
> Neat.
>
> Applied, thanks.

Am I still missing patches from you Andy?

I get:

make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
/builds/linux/drivers/mfd/intel_quark_i2c_gpio.c: In function 'intel_quark_i2c_setup':
/builds/linux/drivers/mfd/intel_quark_i2c_gpio.c:181:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
struct resource *res = intel_quark_i2c_res;
^~~~~~~~~~~~~~~~~~~
/builds/linux/drivers/mfd/intel_quark_i2c_gpio.c: In function 'intel_quark_gpio_setup':
/builds/linux/drivers/mfd/intel_quark_i2c_gpio.c:203:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
struct resource *res = intel_quark_gpio_res;
^~~~~~~~~~~~~~~~~~~~

Link to the build (see: build.log):

https://builds.tuxbuild.com/1rAMovpd041jvsjfQ538kW3nvYK/

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2021-04-14 19:14    [W:0.062 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site