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>] [day] [month] [year] [list]
Date:   Thu, 21 Apr 2022 14:43:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2441/2579] include/linux/fs_api.h:424:29:
 error: static declaration of 'file_inode' follows non-static declaration

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   49e1ec6c70a6eb4b7de9250a455b8b63eb42afbe
commit: 5e5b9f1427ab55c511d68e2ee5471cbeabf50830 [2441/2579] headers/deps: mm: Optimize <linux/pagemap.h> dependencies
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220421/202204210634.Db7gTUaE-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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/mingo/tip.git/commit/?id=5e5b9f1427ab55c511d68e2ee5471cbeabf50830
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 5e5b9f1427ab55c511d68e2ee5471cbeabf50830
        # 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=i386 SHELL=/bin/bash fs/ubifs/

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

All errors (new ones prefixed by >>):

   In file included from fs/ubifs/budget.c:21:
   In file included from fs/ubifs/ubifs.h:40:
   include/linux/fscrypt.h:758:30: error: implicit declaration of function 'file_inode' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           const struct inode *inode = file_inode(iocb->ki_filp);
                                       ^
   include/linux/fscrypt.h:758:30: note: did you mean 'folio_inode'?
   include/linux/pagemap.h:375:29: note: 'folio_inode' declared here
   static inline struct inode *folio_inode(struct folio *folio)
                               ^
   In file included from fs/ubifs/budget.c:21:
   In file included from fs/ubifs/ubifs.h:40:
   include/linux/fscrypt.h:758:22: warning: incompatible integer to pointer conversion initializing 'const struct inode *' with an expression of type 'int' [-Wint-conversion]
           const struct inode *inode = file_inode(iocb->ki_filp);
                               ^       ~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/ubifs/budget.c:22:
   In file included from include/linux/writeback_api.h:16:
   In file included from include/linux/backing-dev-api.h:16:
>> include/linux/fs_api.h:424:29: error: static declaration of 'file_inode' follows non-static declaration
   static inline struct inode *file_inode(const struct file *f)
                               ^
   include/linux/fscrypt.h:758:30: note: previous implicit declaration is here
           const struct inode *inode = file_inode(iocb->ki_filp);
                                       ^
   1 warning and 2 errors generated.
--
   In file included from fs/ubifs/file.c:40:
   In file included from fs/ubifs/ubifs.h:40:
   include/linux/fscrypt.h:758:30: error: implicit declaration of function 'file_inode' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           const struct inode *inode = file_inode(iocb->ki_filp);
                                       ^
   include/linux/fscrypt.h:758:30: note: did you mean 'folio_inode'?
   include/linux/pagemap.h:375:29: note: 'folio_inode' declared here
   static inline struct inode *folio_inode(struct folio *folio)
                               ^
   In file included from fs/ubifs/file.c:40:
   In file included from fs/ubifs/ubifs.h:40:
   include/linux/fscrypt.h:758:22: warning: incompatible integer to pointer conversion initializing 'const struct inode *' with an expression of type 'int' [-Wint-conversion]
           const struct inode *inode = file_inode(iocb->ki_filp);
                               ^       ~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/ubifs/file.c:42:
   In file included from include/linux/writeback_api.h:16:
   In file included from include/linux/backing-dev-api.h:16:
>> include/linux/fs_api.h:424:29: error: static declaration of 'file_inode' follows non-static declaration
   static inline struct inode *file_inode(const struct file *f)
                               ^
   include/linux/fscrypt.h:758:30: note: previous implicit declaration is here
           const struct inode *inode = file_inode(iocb->ki_filp);
                                       ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                   return (set->sig[3] | set->sig[2] |
                           ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                   return (set->sig[3] | set->sig[2] |
                                         ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                   return  (set1->sig[3] == set2->sig[3]) &&
                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                   return  (set1->sig[3] == set2->sig[3]) &&
                                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                           (set1->sig[2] == set2->sig[2]) &&
                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
                           (set1->sig[2] == set2->sig[2]) &&
                                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
   _SIG_SET_BINOP(sigorsets, _sig_or)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP'
                   a3 = a->sig[3]; a2 = a->sig[2];                         \
                        ^      ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:156:1: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
   _SIG_SET_BINOP(sigorsets, _sig_or)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/signal.h:137:24: note: expanded from macro '_SIG_SET_BINOP'
                   a3 = a->sig[3]; a2 = a->sig[2];                         \
                                        ^      ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
   _SIG_SET_BINOP(sigorsets, _sig_or)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/signal.h:138:8: note: expanded from macro '_SIG_SET_BINOP'
                   b3 = b->sig[3]; b2 = b->sig[2];                         \
                        ^      ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:156:1: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
   _SIG_SET_BINOP(sigorsets, _sig_or)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/signal.h:138:24: note: expanded from macro '_SIG_SET_BINOP'
                   b3 = b->sig[3]; b2 = b->sig[2];                         \
                                        ^      ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from fs/ubifs/file.c:44:
   In file included from include/linux/syscalls_api.h:11:
   include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]


vim +/file_inode +424 include/linux/fs_api.h

0f5d0a0fe62409 Ingo Molnar 2022-04-16  423  
0f5d0a0fe62409 Ingo Molnar 2022-04-16 @424  static inline struct inode *file_inode(const struct file *f)
0f5d0a0fe62409 Ingo Molnar 2022-04-16  425  {
0f5d0a0fe62409 Ingo Molnar 2022-04-16  426  	return f->f_inode;
0f5d0a0fe62409 Ingo Molnar 2022-04-16  427  }
0f5d0a0fe62409 Ingo Molnar 2022-04-16  428  

:::::: The code at line 424 was first introduced by commit
:::::: 0f5d0a0fe6240979a116fdd86cc2997879173bff headers/deps: fs: Split <linux/fs.h> into <linux/fs_types.h> and <linux/fs_api.h>

:::::: TO: Ingo Molnar <mingo@...nel.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>

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

Powered by blists - more mailing lists