[linux-next:master 3825/5027] arch/mips/pic32/pic32mzda/config.c:22:8: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int

[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:   451cc82bd11eb6a374f4dbcfc1cf007eafea91ab
commit: 657c45b303f87d77eb4ef49e9452f1c5d1fc363c [3825/5027] MIPS: Explicitly include correct DT includes
config: mips-randconfig-r022-20230727 (https://download.01.org/0day-ci/archive/20230728/202307280212.w1lY1gCG-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307280212.w1lY1gCG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307280212.w1lY1gCG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> arch/mips/pic32/pic32mzda/config.c:22:8: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
      22 | static DEFINE_SPINLOCK(config_lock);
         | ~~~~~~ ^
         | int
>> arch/mips/pic32/pic32mzda/config.c:22:24: error: a parameter list without types is only allowed in a function definition
      22 | static DEFINE_SPINLOCK(config_lock);
         |                        ^
>> arch/mips/pic32/pic32mzda/config.c:41:2: error: call to undeclared function 'spin_lock_irqsave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      41 |         spin_lock_irqsave(&config_lock, flags);
         |         ^
>> arch/mips/pic32/pic32mzda/config.c:41:21: error: use of undeclared identifier 'config_lock'
      41 |         spin_lock_irqsave(&config_lock, flags);
         |                            ^
>> arch/mips/pic32/pic32mzda/config.c:46:2: error: call to undeclared function 'spin_unlock_irqrestore'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      46 |         spin_unlock_irqrestore(&config_lock, flags);
         |         ^
   arch/mips/pic32/pic32mzda/config.c:46:26: error: use of undeclared identifier 'config_lock'
      46 |         spin_unlock_irqrestore(&config_lock, flags);
         |                                 ^
   6 errors generated.


vim +/int +22 arch/mips/pic32/pic32mzda/config.c

2572f00db8a68bb Joshua Henderson 2016-01-13  20  
2572f00db8a68bb Joshua Henderson 2016-01-13  21  static void __iomem *pic32_conf_base;
2572f00db8a68bb Joshua Henderson 2016-01-13 @22  static DEFINE_SPINLOCK(config_lock);
2572f00db8a68bb Joshua Henderson 2016-01-13  23  static u32 pic32_reset_status;
2572f00db8a68bb Joshua Henderson 2016-01-13  24  
2572f00db8a68bb Joshua Henderson 2016-01-13  25  static u32 pic32_conf_get_reg_field(u32 offset, u32 rshift, u32 mask)
2572f00db8a68bb Joshua Henderson 2016-01-13  26  {
2572f00db8a68bb Joshua Henderson 2016-01-13  27  	u32 v;
2572f00db8a68bb Joshua Henderson 2016-01-13  28  
2572f00db8a68bb Joshua Henderson 2016-01-13  29  	v = readl(pic32_conf_base + offset);
2572f00db8a68bb Joshua Henderson 2016-01-13  30  	v >>= rshift;
2572f00db8a68bb Joshua Henderson 2016-01-13  31  	v &= mask;
2572f00db8a68bb Joshua Henderson 2016-01-13  32  
2572f00db8a68bb Joshua Henderson 2016-01-13  33  	return v;
2572f00db8a68bb Joshua Henderson 2016-01-13  34  }
2572f00db8a68bb Joshua Henderson 2016-01-13  35  
2572f00db8a68bb Joshua Henderson 2016-01-13  36  static u32 pic32_conf_modify_atomic(u32 offset, u32 mask, u32 set)
2572f00db8a68bb Joshua Henderson 2016-01-13  37  {
2572f00db8a68bb Joshua Henderson 2016-01-13  38  	u32 v;
2572f00db8a68bb Joshua Henderson 2016-01-13  39  	unsigned long flags;
2572f00db8a68bb Joshua Henderson 2016-01-13  40  
2572f00db8a68bb Joshua Henderson 2016-01-13 @41  	spin_lock_irqsave(&config_lock, flags);
2572f00db8a68bb Joshua Henderson 2016-01-13  42  	v = readl(pic32_conf_base + offset);
2572f00db8a68bb Joshua Henderson 2016-01-13  43  	v &= ~mask;
2572f00db8a68bb Joshua Henderson 2016-01-13  44  	v |= (set & mask);
2572f00db8a68bb Joshua Henderson 2016-01-13  45  	writel(v, pic32_conf_base + offset);
2572f00db8a68bb Joshua Henderson 2016-01-13 @46  	spin_unlock_irqrestore(&config_lock, flags);
2572f00db8a68bb Joshua Henderson 2016-01-13  47  
2572f00db8a68bb Joshua Henderson 2016-01-13  48  	return 0;
2572f00db8a68bb Joshua Henderson 2016-01-13  49  }
2572f00db8a68bb Joshua Henderson 2016-01-13  50  

:::::: The code at line 22 was first introduced by commit
:::::: 2572f00db8a68bb46001678c1c98ad8b70e04b31 MIPS: Add support for PIC32MZDA platform

:::::: TO: Joshua Henderson <joshua.henderson@xxxxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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