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] [day] [month] [year] [list]
Message-ID: <202212260032.8DimQjha-lkp@intel.com>
Date:   Mon, 26 Dec 2022 00:51:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Marvin Lin <milkfafa@...il.com>, mchehab@...nel.org,
        hverkuil-cisco@...all.nl, avifishman70@...il.com,
        tmaimon77@...il.com, tali.perry1@...il.com, venture@...gle.com,
        yuenn@...gle.com, benjaminfair@...gle.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, andrzej.p@...labora.com
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        devicetree@...r.kernel.org, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, openbmc@...ts.ozlabs.org,
        kwliu@...oton.com, kflin@...oton.com,
        Marvin Lin <milkfafa@...il.com>
Subject: Re: [PATCH v9 7/7] media: nuvoton: Add driver for NPCM video capture
 and encode engine

Hi Marvin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on linus/master next-20221220]
[cannot apply to robh/for-next v6.1]
[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/Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20221220-175013
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20221220094055.3011916-8-milkfafa%40gmail.com
patch subject: [PATCH v9 7/7] media: nuvoton: Add driver for NPCM video capture and encode engine
config: hexagon-allmodconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project f5700e7b69048de958172fb513b336564e7f8709)
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/e37f65b3251b5953005dcdcf39d153c87b40c083
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20221220-175013
        git checkout e37f65b3251b5953005dcdcf39d153c87b40c083
        # 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/media/platform/nuvoton/ drivers/media/platform/verisilicon/ drivers/net/ethernet/marvell/prestera/ drivers/pwm/ kernel/trace/ sound/soc/qcom/qdsp6/ sound/usb/

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/media/platform/nuvoton/npcm-video.c:15:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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/media/platform/nuvoton/npcm-video.c:15:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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/media/platform/nuvoton/npcm-video.c:15:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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);
                                                         ~~~~~~~~~~ ^
>> drivers/media/platform/nuvoton/npcm-video.c:556:6: warning: variable 'count' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (video->list && video->rect) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:567:9: note: uninitialized use occurs here
           return count;
                  ^~~~~
   drivers/media/platform/nuvoton/npcm-video.c:556:2: note: remove the 'if' if its condition is always true
           if (video->list && video->rect) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/nuvoton/npcm-video.c:556:6: warning: variable 'count' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
           if (video->list && video->rect) {
               ^~~~~~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:567:9: note: uninitialized use occurs here
           return count;
                  ^~~~~
   drivers/media/platform/nuvoton/npcm-video.c:556:6: note: remove the '&&' if its condition is always true
           if (video->list && video->rect) {
               ^~~~~~~~~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:554:20: note: initialize the variable 'count' to silence this warning
           unsigned int count;
                             ^
                              = 0
>> drivers/media/platform/nuvoton/npcm-video.c:1017:13: warning: variable 'baseptr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           } else if (of_device_is_compatible(video->dev->of_node,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:1045:9: note: uninitialized use occurs here
           memset(baseptr, 0, GMMAP_LENGTH);
                  ^~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:1017:9: note: remove the 'if' if its condition is always true
           } else if (of_device_is_compatible(video->dev->of_node,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nuvoton/npcm-video.c:993:23: note: initialize the variable 'baseptr' to silence this warning
           void __iomem *baseptr;
                                ^
                                 = NULL
   9 warnings generated.


vim +556 drivers/media/platform/nuvoton/npcm-video.c

   549	
   550	static unsigned int npcm_video_get_rect_count(struct npcm_video *video)
   551	{
   552		struct list_head *head, *pos, *nx;
   553		struct rect_list *tmp;
   554		unsigned int count;
   555	
 > 556		if (video->list && video->rect) {
   557			count = video->rect[video->vb_index];
   558			head = &video->list[video->vb_index];
   559	
   560			list_for_each_safe(pos, nx, head) {
   561				tmp = list_entry(pos, struct rect_list, list);
   562				list_del(&tmp->list);
   563				kfree(tmp);
   564			}
   565		}
   566	
   567		return count;
   568	}
   569	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ