All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:pending-4.9 57/84] net/6lowpan/debugfs.c:180:3: warning: 'return' with no value, in function returning non-void
@ 2021-09-13  1:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-13  1:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5000 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-4.9
head:   2a1ce5a3b34767c4c3175f7fae2f35f7bbc7b819
commit: 68c66a31cc9a38a26a89f9594945390a09355728 [57/84] 6lowpan: iphc: Fix an off-by-one check of array index
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.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/sashal/linux-stable.git/commit/?id=68c66a31cc9a38a26a89f9594945390a09355728
        git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
        git fetch --no-tags sashal-linux-stable pending-4.9
        git checkout 68c66a31cc9a38a26a89f9594945390a09355728
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/fs.h:4,
                    from include/linux/debugfs.h:18,
                    from include/net/6lowpan.h:56,
                    from net/6lowpan/debugfs.c:15:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
            ^
   include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!virt_addr_valid(buf));
     ^~~~~~
   arch/xtensa/include/asm/page.h:193:32: note: in expansion of macro 'pfn_valid'
    #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
                                   ^~~~~~~~~
   include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
     BUG_ON(!virt_addr_valid(buf));
             ^~~~~~~~~~~~~~~
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
            ^
   include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/dma-mapping.h:284:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
     ^~~~~~
   include/linux/dma-mapping.h:284:9: note: in expansion of macro 'pfn_valid'
     BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
            ^~~~~~~~~
   net/6lowpan/debugfs.c: In function 'lowpan_dev_debugfs_ctx_init':
>> net/6lowpan/debugfs.c:180:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
      return;
      ^~~~~~
   net/6lowpan/debugfs.c:172:12: note: declared here
    static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/return +180 net/6lowpan/debugfs.c

   171	
   172	static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
   173					       struct dentry *ctx, u8 id)
   174	{
   175		struct lowpan_dev *ldev = lowpan_dev(dev);
   176		struct dentry *dentry, *root;
   177		char buf[32];
   178	
   179		if (WARN_ON_ONCE(id >= LOWPAN_IPHC_CTX_TABLE_SIZE))
 > 180			return;
   181	
   182		sprintf(buf, "%d", id);
   183	
   184		root = debugfs_create_dir(buf, ctx);
   185		if (!root)
   186			return -EINVAL;
   187	
   188		dentry = debugfs_create_file("active", 0644, root,
   189					     &ldev->ctx.table[id],
   190					     &lowpan_ctx_flag_active_fops);
   191		if (!dentry)
   192			return -EINVAL;
   193	
   194		dentry = debugfs_create_file("compression", 0644, root,
   195					     &ldev->ctx.table[id],
   196					     &lowpan_ctx_flag_c_fops);
   197		if (!dentry)
   198			return -EINVAL;
   199	
   200		dentry = debugfs_create_file("prefix", 0644, root,
   201					     &ldev->ctx.table[id],
   202					     &lowpan_ctx_pfx_fops);
   203		if (!dentry)
   204			return -EINVAL;
   205	
   206		dentry = debugfs_create_file("prefix_len", 0644, root,
   207					     &ldev->ctx.table[id],
   208					     &lowpan_ctx_plen_fops);
   209		if (!dentry)
   210			return -EINVAL;
   211	
   212		return 0;
   213	}
   214	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47164 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-13  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  1:58 [sashal-linux-stable:pending-4.9 57/84] net/6lowpan/debugfs.c:180:3: warning: 'return' with no value, in function returning non-void kernel test robot

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.