* [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type
@ 2022-06-16 8:58 kernel test robot
2022-06-16 13:12 ` David Sterba
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2022-06-16 8:58 UTC (permalink / raw)
To: Fabio M. De Francesco
Cc: kbuild-all, Linux Memory Management List, David Sterba
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8
commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem: Make kunmap_{local,atomic}() take pointers to const void
config: parisc-randconfig-r012-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161652.aEEuklTk-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/iio/light/ drivers/net/wwan/t7xx/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/adjd_s311.c:15:
include/linux/highmem-internal.h: In function '__kunmap_local':
>> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
203 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/adjd_s311.c:15:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/adjd_s311.c:15:
include/linux/highmem-internal.h: In function '__kunmap_atomic':
include/linux/highmem-internal.h:230:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/adjd_s311.c:15:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
--
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/jsa1212.c:16:
include/linux/highmem-internal.h: In function '__kunmap_local':
>> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
203 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/jsa1212.c:16:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/jsa1212.c:16:
include/linux/highmem-internal.h: In function '__kunmap_atomic':
include/linux/highmem-internal.h:230:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/jsa1212.c:16:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
At top level:
drivers/iio/light/jsa1212.c:426:36: warning: 'jsa1212_acpi_match' defined but not used [-Wunused-const-variable=]
426 | static const struct acpi_device_id jsa1212_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/ltr501.c:13:
include/linux/highmem-internal.h: In function '__kunmap_local':
>> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
203 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/ltr501.c:13:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/ltr501.c:13:
include/linux/highmem-internal.h: In function '__kunmap_atomic':
include/linux/highmem-internal.h:230:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/ltr501.c:13:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
At top level:
drivers/iio/light/ltr501.c:1632:36: warning: 'ltr_acpi_match' defined but not used [-Wunused-const-variable=]
1632 | static const struct acpi_device_id ltr_acpi_match[] = {
| ^~~~~~~~~~~~~~
--
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/rpr0521.c:14:
include/linux/highmem-internal.h: In function '__kunmap_local':
>> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
203 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/rpr0521.c:14:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/rpr0521.c:14:
include/linux/highmem-internal.h: In function '__kunmap_atomic':
include/linux/highmem-internal.h:230:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/rpr0521.c:14:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
At top level:
drivers/iio/light/rpr0521.c:1108:36: warning: 'rpr0521_acpi_match' defined but not used [-Wunused-const-variable=]
1108 | static const struct acpi_device_id rpr0521_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/stk3310.c:11:
include/linux/highmem-internal.h: In function '__kunmap_local':
>> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
203 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/stk3310.c:11:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
In file included from include/linux/highmem.h:13,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/stk3310.c:11:
include/linux/highmem-internal.h: In function '__kunmap_atomic':
include/linux/highmem-internal.h:230:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | kunmap_flush_on_unmap(addr);
| ^~~~
In file included from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/writeback.h:13,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:19,
from drivers/iio/light/stk3310.c:11:
arch/parisc/include/asm/cacheflush.h:78:48: note: expected 'void *' but argument is of type 'const void *'
78 | static inline void kunmap_flush_on_unmap(void *addr)
| ~~~~~~^~~~
At top level:
drivers/iio/light/stk3310.c:694:36: warning: 'stk3310_acpi_id' defined but not used [-Wunused-const-variable=]
694 | static const struct acpi_device_id stk3310_acpi_id[] = {
| ^~~~~~~~~~~~~~~
..
vim +203 include/linux/highmem-internal.h
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 199
20adc3e8f39ad4 Fabio M. De Francesco 2022-06-15 200 static inline void __kunmap_local(const void *addr)
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 201 {
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 202 #ifdef ARCH_HAS_FLUSH_ON_KUNMAP
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 @203 kunmap_flush_on_unmap(addr);
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 204 #endif
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 205 }
f3ba3c710ac5a3 Thomas Gleixner 2020-11-18 206
:::::: The code at line 203 was first introduced by commit
:::::: f3ba3c710ac5a30cd058615a9eb62d2ad95bb782 mm/highmem: Provide kmap_local*
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type
2022-06-16 8:58 [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type kernel test robot
@ 2022-06-16 13:12 ` David Sterba
0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2022-06-16 13:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]
On Thu, Jun 16, 2022 at 04:58:08PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8
> commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem: Make kunmap_{local,atomic}() take pointers to const void
> config: parisc-randconfig-r012-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161652.aEEuklTk-lkp(a)intel.com/config)
> compiler: hppa-linux-gcc (GCC) 11.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/iio/light/ drivers/net/wwan/t7xx/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/linux/highmem.h:13,
> from include/linux/bvec.h:10,
> from include/linux/blk_types.h:10,
> from include/linux/writeback.h:13,
> from include/linux/memcontrol.h:22,
> from include/linux/swap.h:9,
> from include/linux/suspend.h:5,
> from include/linux/regulator/consumer.h:35,
> from include/linux/i2c.h:19,
> from drivers/iio/light/adjd_s311.c:15:
> include/linux/highmem-internal.h: In function '__kunmap_local':
> >> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 203 | kunmap_flush_on_unmap(addr);
I think you missed adding const to kunmap_flush_on_unmap, in some
configs it could be hidden behind an ifdef. The warning is on
ARCH=parisc,
https://elixir.bootlin.com/linux/latest/source/arch/parisc/include/asm/cacheflush.h#L78
#define ARCH_HAS_FLUSH_ON_KUNMAP
static inline void kunmap_flush_on_unmap(void *addr)
{
flush_kernel_dcache_page_addr(addr);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type
@ 2022-06-16 13:12 ` David Sterba
0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2022-06-16 13:12 UTC (permalink / raw)
To: kernel test robot
Cc: Fabio M. De Francesco, kbuild-all, Linux Memory Management List,
David Sterba
On Thu, Jun 16, 2022 at 04:58:08PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8
> commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem: Make kunmap_{local,atomic}() take pointers to const void
> config: parisc-randconfig-r012-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161652.aEEuklTk-lkp@intel.com/config)
> compiler: hppa-linux-gcc (GCC) 11.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/iio/light/ drivers/net/wwan/t7xx/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/linux/highmem.h:13,
> from include/linux/bvec.h:10,
> from include/linux/blk_types.h:10,
> from include/linux/writeback.h:13,
> from include/linux/memcontrol.h:22,
> from include/linux/swap.h:9,
> from include/linux/suspend.h:5,
> from include/linux/regulator/consumer.h:35,
> from include/linux/i2c.h:19,
> from drivers/iio/light/adjd_s311.c:15:
> include/linux/highmem-internal.h: In function '__kunmap_local':
> >> include/linux/highmem-internal.h:203:31: warning: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 203 | kunmap_flush_on_unmap(addr);
I think you missed adding const to kunmap_flush_on_unmap, in some
configs it could be hidden behind an ifdef. The warning is on
ARCH=parisc,
https://elixir.bootlin.com/linux/latest/source/arch/parisc/include/asm/cacheflush.h#L78
#define ARCH_HAS_FLUSH_ON_KUNMAP
static inline void kunmap_flush_on_unmap(void *addr)
{
flush_kernel_dcache_page_addr(addr);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type
2022-06-16 13:12 ` David Sterba
@ 2022-06-16 14:10 ` Fabio M. De Francesco
-1 siblings, 0 replies; 5+ messages in thread
From: Fabio M. De Francesco @ 2022-06-16 14:10 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]
On giovedì 16 giugno 2022 15:12:43 CEST David Sterba wrote:
> On Thu, Jun 16, 2022 at 04:58:08PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8
> > commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem:
Make kunmap_{local,atomic}() take pointers to const void
> > config: parisc-randconfig-r012-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161652.aEEuklTk-lkp(a)intel.com/config)
> > compiler: hppa-linux-gcc (GCC) 11.3.0
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/
sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/
kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross
W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/iio/light/ drivers/net/
wwan/t7xx/
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > In file included from include/linux/highmem.h:13,
> > from include/linux/bvec.h:10,
> > from include/linux/blk_types.h:10,
> > from include/linux/writeback.h:13,
> > from include/linux/memcontrol.h:22,
> > from include/linux/swap.h:9,
> > from include/linux/suspend.h:5,
> > from include/linux/regulator/consumer.h:35,
> > from include/linux/i2c.h:19,
> > from drivers/iio/light/adjd_s311.c:15:
> > include/linux/highmem-internal.h: In function '__kunmap_local':
> > >> include/linux/highmem-internal.h:203:31: warning: passing argument 1
of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target
type [-Wdiscarded-qualifiers]
> > 203 | kunmap_flush_on_unmap(addr);
>
> I think you missed adding const to kunmap_flush_on_unmap, in some
> configs it could be hidden behind an ifdef. The warning is on
> ARCH=parisc,
>
> https://elixir.bootlin.com/linux/latest/source/arch/parisc/include/asm/
cacheflush.h#L78
>
> #define ARCH_HAS_FLUSH_ON_KUNMAP
> static inline void kunmap_flush_on_unmap(void *addr)
> {
> flush_kernel_dcache_page_addr(addr);
> }
>
>
I think that you are looking at an old report. Hours ago I sent a new
version of this patch[1] and also a new version of the patch for the
conversions of zstd.c to kmap_local_page() (without those casts which are
no any longer necessary).
Sorry for not replying to this report.
Thanks,
Fabio
[1] https://lore.kernel.org/lkml/20220616081133.14144-2-fmdefrancesco(a)gmail.com/
[2] https://lore.kernel.org/lkml/20220616081133.14144-3-fmdefrancesco(a)gmail.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type
@ 2022-06-16 14:10 ` Fabio M. De Francesco
0 siblings, 0 replies; 5+ messages in thread
From: Fabio M. De Francesco @ 2022-06-16 14:10 UTC (permalink / raw)
To: dsterba, kernel test robot, Fabio M. De Francesco, kbuild-all,
Linux Memory Management List, David Sterba
On giovedì 16 giugno 2022 15:12:43 CEST David Sterba wrote:
> On Thu, Jun 16, 2022 at 04:58:08PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8
> > commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem:
Make kunmap_{local,atomic}() take pointers to const void
> > config: parisc-randconfig-r012-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161652.aEEuklTk-lkp@intel.com/config)
> > compiler: hppa-linux-gcc (GCC) 11.3.0
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/
sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/
kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross
W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/iio/light/ drivers/net/
wwan/t7xx/
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > In file included from include/linux/highmem.h:13,
> > from include/linux/bvec.h:10,
> > from include/linux/blk_types.h:10,
> > from include/linux/writeback.h:13,
> > from include/linux/memcontrol.h:22,
> > from include/linux/swap.h:9,
> > from include/linux/suspend.h:5,
> > from include/linux/regulator/consumer.h:35,
> > from include/linux/i2c.h:19,
> > from drivers/iio/light/adjd_s311.c:15:
> > include/linux/highmem-internal.h: In function '__kunmap_local':
> > >> include/linux/highmem-internal.h:203:31: warning: passing argument 1
of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target
type [-Wdiscarded-qualifiers]
> > 203 | kunmap_flush_on_unmap(addr);
>
> I think you missed adding const to kunmap_flush_on_unmap, in some
> configs it could be hidden behind an ifdef. The warning is on
> ARCH=parisc,
>
> https://elixir.bootlin.com/linux/latest/source/arch/parisc/include/asm/
cacheflush.h#L78
>
> #define ARCH_HAS_FLUSH_ON_KUNMAP
> static inline void kunmap_flush_on_unmap(void *addr)
> {
> flush_kernel_dcache_page_addr(addr);
> }
>
>
I think that you are looking at an old report. Hours ago I sent a new
version of this patch[1] and also a new version of the patch for the
conversions of zstd.c to kmap_local_page() (without those casts which are
no any longer necessary).
Sorry for not replying to this report.
Thanks,
Fabio
[1] https://lore.kernel.org/lkml/20220616081133.14144-2-fmdefrancesco@gmail.com/
[2] https://lore.kernel.org/lkml/20220616081133.14144-3-fmdefrancesco@gmail.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-16 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-16 8:58 [linux-next:master 3345/4062] include/linux/highmem-internal.h:203:31: error: passing argument 1 of 'kunmap_flush_on_unmap' discards 'const' qualifier from pointer target type kernel test robot
2022-06-16 13:12 ` David Sterba
2022-06-16 13:12 ` David Sterba
2022-06-16 14:10 ` Fabio M. De Francesco
2022-06-16 14:10 ` Fabio M. De Francesco
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.