[linux-next:master 11581/11865] include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   abaf6f60176f1ae9d946d63e4db63164600b7b1a
commit: e8805271b82793e6d1f3de786c2278e4d622bdb6 [11581/11865] mm/gfp: add kernel-doc for gfp_t
config: x86_64-randconfig-r022-20210220 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e8805271b82793e6d1f3de786c2278e4d622bdb6
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout e8805271b82793e6d1f3de786c2278e4d622bdb6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
>> include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition]
   typedef unsigned int __bitwise gfp_t;   // repeated here for kernel-doc
                                  ^
   include/linux/types.h:148:32: note: previous definition is here
   typedef unsigned int __bitwise gfp_t;
                                  ^
   1 warning generated.
--
   In file included from kernel/locking/lockdep.c:34:
   In file included from include/linux/sched/mm.h:9:
>> include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition]
   typedef unsigned int __bitwise gfp_t;   // repeated here for kernel-doc
                                  ^
   include/linux/types.h:148:32: note: previous definition is here
   typedef unsigned int __bitwise gfp_t;
                                  ^
   kernel/locking/lockdep.c:709:4: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
                           class->wait_type_outer ?: class->wait_type_inner,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/lockdep.c:1924:20: warning: unused function 'hlock_equal' [-Wunused-function]
   static inline bool hlock_equal(struct lock_list *entry, void *data)
                      ^
   3 warnings generated.
--
   In file included from kernel/locking/qspinlock.c:29:
   In file included from kernel/locking/qspinlock_stat.h:16:
   In file included from include/linux/fs.h:15:
   In file included from include/linux/radix-tree.h:19:
   In file included from include/linux/xarray.h:14:
>> include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition]
   typedef unsigned int __bitwise gfp_t;   // repeated here for kernel-doc
                                  ^
   include/linux/types.h:148:32: note: previous definition is here
   typedef unsigned int __bitwise gfp_t;
                                  ^
   In file included from kernel/locking/qspinlock.c:29:
   kernel/locking/qspinlock_stat.h:36:9: warning: no previous prototype for function 'lockevent_read' [-Wmissing-prototypes]
   ssize_t lockevent_read(struct file *file, char __user *user_buf,
           ^
   kernel/locking/qspinlock_stat.h:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   ssize_t lockevent_read(struct file *file, char __user *user_buf,
   ^
   static 
   In file included from kernel/locking/qspinlock.c:581:
   kernel/locking/qspinlock_paravirt.h:493:1: warning: no previous prototype for function '__pv_queued_spin_unlock_slowpath' [-Wmissing-prototypes]
   __pv_queued_spin_unlock_slowpath(struct qspinlock *lock, u8 locked)
   ^
   kernel/locking/qspinlock_paravirt.h:492:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
   __visible void
             ^
             static 
   3 warnings generated.
--
   In file included from kernel/locking/lock_events.c:19:
   In file included from include/linux/debugfs.h:15:
   In file included from include/linux/fs.h:15:
   In file included from include/linux/radix-tree.h:19:
   In file included from include/linux/xarray.h:14:
>> include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition]
   typedef unsigned int __bitwise gfp_t;   // repeated here for kernel-doc
                                  ^
   include/linux/types.h:148:32: note: previous definition is here
   typedef unsigned int __bitwise gfp_t;
                                  ^
   kernel/locking/lock_events.c:61:16: warning: no previous prototype for function 'lockevent_read' [-Wmissing-prototypes]
   ssize_t __weak lockevent_read(struct file *file, char __user *user_buf,
                  ^
   kernel/locking/lock_events.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   ssize_t __weak lockevent_read(struct file *file, char __user *user_buf,
   ^
   static 
   2 warnings generated.
--
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
>> include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition]
   typedef unsigned int __bitwise gfp_t;   // repeated here for kernel-doc
                                  ^
   include/linux/types.h:148:32: note: previous definition is here
   typedef unsigned int __bitwise gfp_t;
                                  ^
   1 warning generated.


vim +/gfp_t +20 include/linux/gfp.h

    10	
    11	/**
    12	 * typedef gfp_t - Memory allocation flags.
    13	 *
    14	 * GFP flags are commonly used throughout Linux to indicate how memory
    15	 * should be allocated.  The GFP acronym stands for "get free pages",
    16	 * the underlying memory allocation function.  Not every GFP flag is
    17	 * supported by every function which may allocate memory.  Most users
    18	 * will want to use a plain ``GFP_KERNEL``.
    19	 */
  > 20	typedef unsigned int __bitwise gfp_t;	// repeated here for kernel-doc
    21	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux