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: <202301111321.vRzvkMX5-lkp@intel.com>
Date:   Wed, 11 Jan 2023 14:03:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Rafał Miłecki <zajec5@...il.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Michael Walle <michael@...le.cc>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        u-boot@...ts.denx.de,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH 1/6] nvmem: core: add nvmem_dev_size() helper

Hi Rafał,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20230110]
[also build test WARNING on v6.2-rc3]
[cannot apply to robh/for-next shawnguo/for-next mtd/mtd/next mtd/mtd/fixes linus/master v6.2-rc3 v6.2-rc2 v6.2-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rafa-Mi-ecki/nvmem-core-allow-read_post_process-callbacks-to-adjust-data-length/20230110-185915
patch link:    https://lore.kernel.org/r/20230110105425.13188-1-zajec5%40gmail.com
patch subject: [PATCH 1/6] nvmem: core: add nvmem_dev_size() helper
config: hexagon-randconfig-r041-20230110
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162)
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://github.com/intel-lab-lkp/linux/commit/4d5cc61f8d02a82344468f172a852ffc56cf0d5c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Rafa-Mi-ecki/nvmem-core-allow-read_post_process-callbacks-to-adjust-data-length/20230110-185915
        git checkout 4d5cc61f8d02a82344468f172a852ffc56cf0d5c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/nvmem/ drivers/thermal/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/nvmem/core.c:16:
>> include/linux/nvmem-consumer.h:81:1: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
   const size_t nvmem_dev_size(struct nvmem_device *nvmem);
   ^~~~~~
>> drivers/nvmem/core.c:2070:1: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
   const size_t nvmem_dev_size(struct nvmem_device *nvmem)
   ^~~~~~
   2 warnings generated.
--
   In file included from drivers/thermal/mtk_thermal.c:12:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/thermal/mtk_thermal.c:12:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/thermal/mtk_thermal.c:12:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   In file included from drivers/thermal/mtk_thermal.c:15:
>> include/linux/nvmem-consumer.h:81:1: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
   const size_t nvmem_dev_size(struct nvmem_device *nvmem);
   ^~~~~~
   7 warnings generated.


vim +/const +81 include/linux/nvmem-consumer.h

    49	
    50	/* Cell based interface */
    51	struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *id);
    52	struct nvmem_cell *devm_nvmem_cell_get(struct device *dev, const char *id);
    53	void nvmem_cell_put(struct nvmem_cell *cell);
    54	void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell);
    55	void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);
    56	int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
    57	int nvmem_cell_read_u8(struct device *dev, const char *cell_id, u8 *val);
    58	int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val);
    59	int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val);
    60	int nvmem_cell_read_u64(struct device *dev, const char *cell_id, u64 *val);
    61	int nvmem_cell_read_variable_le_u32(struct device *dev, const char *cell_id,
    62					    u32 *val);
    63	int nvmem_cell_read_variable_le_u64(struct device *dev, const char *cell_id,
    64					    u64 *val);
    65	
    66	/* direct nvmem device read/write interface */
    67	struct nvmem_device *nvmem_device_get(struct device *dev, const char *name);
    68	struct nvmem_device *devm_nvmem_device_get(struct device *dev,
    69						   const char *name);
    70	void nvmem_device_put(struct nvmem_device *nvmem);
    71	void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem);
    72	int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset,
    73			      size_t bytes, void *buf);
    74	int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset,
    75			       size_t bytes, void *buf);
    76	ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
    77				   struct nvmem_cell_info *info, void *buf);
    78	int nvmem_device_cell_write(struct nvmem_device *nvmem,
    79				    struct nvmem_cell_info *info, void *buf);
    80	
  > 81	const size_t nvmem_dev_size(struct nvmem_device *nvmem);
    82	const char *nvmem_dev_name(struct nvmem_device *nvmem);
    83	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (160908 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ