[vfs:work.uaccess-unaligned 1/2] arch/xtensa/include/asm/flat.h:18:1: warning: no return statement in function returning non-void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.uaccess-unaligned
head:   8c06bc3844907d370b6c651175e86bbec9868eca
commit: 2b47a4d7243634e0b7a46282fa7fd454792cca44 [1/2] binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail
config: xtensa-nommu_kc705_defconfig (attached as .config)
compiler: xtensa-de212-elf-gcc (crosstool-NG crosstool-ng-1.22.0-134-ge1d494a) 5.3.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2b47a4d7243634e0b7a46282fa7fd454792cca44
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   In file included from include/linux/flat.h:13:0,
                    from fs/binfmt_flat.c:36:
   arch/xtensa/include/asm/flat.h: In function 'flat_put_addr_at_rp':
>> arch/xtensa/include/asm/flat.h:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
   fs/binfmt_flat.c: In function 'load_flat_file':
   <command-line>:0:16: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'u32 {aka unsigned int}' [-Wformat=]
   fs/binfmt_flat.c:18:21: note: in expansion of macro 'KBUILD_MODNAME'
    #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
                        ^
   include/linux/dynamic_debug.h:126:35: note: in expansion of macro 'pr_fmt'
      __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
                                      ^
   include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^
   fs/binfmt_flat.c:577:3: note: in expansion of macro 'pr_debug'
      pr_debug("Allocated data+bss+stack (%ld bytes): %lx\n",
      ^

vim +18 arch/xtensa/include/asm/flat.h

     2	#define __ASM_XTENSA_FLAT_H
     3	
     4	#include <asm/unaligned.h>
     5	
     6	#define flat_argvp_envp_on_stack()			0
     7	#define flat_old_ram_flag(flags)			(flags)
     8	#define flat_reloc_valid(reloc, size)			((reloc) <= (size))
     9	static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
    10						u32 *addr, u32 *persistent)
    11	{
    12		*addr = get_unaligned((__force u32 *)rp);
    13		return 0;
    14	}
    15	static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
    16	{
    17		put_unaligned(addr, (__force u32 *)rp);
  > 18	}
    19	#define flat_get_relocate_addr(rel)			(rel)
    20	#define flat_set_persistent(relval, p)			0
    21	
    22	#endif /* __ASM_XTENSA_FLAT_H */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux