linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [powerpc:next-test 21/79] arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
@ 2023-08-18  7:59 kernel test robot
  2023-08-18 12:36 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-08-18  7:59 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: llvm, linuxppc-dev, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   c56963d48343b50998bacc6df949217c950163e3
commit: 54f30b83fe627453082f15d83d7820b28b2d24bb [21/79] powerpc: address missing-prototypes warnings
config: powerpc-g5_defconfig (https://download.01.org/0day-ci/archive/20230818/202308181501.AR5HMDWC-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230818/202308181501.AR5HMDWC-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308181501.AR5HMDWC-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak' [-Werror,-Wunused-function]
   static inline int simple_feature_tweak(struct device_node *node, int type,
                     ^
   1 error generated.


vim +/simple_feature_tweak +137 arch/powerpc/platforms/powermac/feature.c

14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  132  
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  133  /*
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  134   * Here are the chip specific feature functions
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  135   */
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  136  
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26 @137  static inline int simple_feature_tweak(struct device_node *node, int type,
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  138  				       int reg, u32 mask, int value)
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  139  {
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  140  	struct macio_chip*	macio;
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  141  	unsigned long		flags;
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  142  
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  143  	macio = macio_find(node, type);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  144  	if (!macio)
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  145  		return -ENODEV;
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  146  	LOCK(flags);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  147  	if (value)
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  148  		MACIO_BIS(reg, mask);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  149  	else
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  150  		MACIO_BIC(reg, mask);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  151  	(void)MACIO_IN32(reg);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  152  	UNLOCK(flags);
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  153  
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  154  	return 0;
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  155  }
14cf11af6cf608 arch/powerpc/platforms/powermac/pmac_feature.c Paul Mackerras 2005-09-26  156  

:::::: The code at line 137 was first introduced by commit
:::::: 14cf11af6cf608eb8c23e989ddb17a715ddce109 powerpc: Merge enough to start building in arch/powerpc.

:::::: TO: Paul Mackerras <paulus@samba.org>
:::::: CC: Paul Mackerras <paulus@samba.org>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [powerpc:next-test 21/79] arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
  2023-08-18  7:59 [powerpc:next-test 21/79] arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak' kernel test robot
@ 2023-08-18 12:36 ` Arnd Bergmann
  2023-08-19  7:04   ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-08-18 12:36 UTC (permalink / raw)
  To: kernel test robot; +Cc: llvm, linuxppc-dev, oe-kbuild-all

On Fri, Aug 18, 2023, at 09:59, kernel test robot wrote:
> tree:   
> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git 
> next-test
> head:   c56963d48343b50998bacc6df949217c950163e3
> commit: 54f30b83fe627453082f15d83d7820b28b2d24bb [21/79] powerpc: 
> address missing-prototypes warnings

>
> 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@intel.com>
> | Closes: 
> https://lore.kernel.org/oe-kbuild-all/202308181501.AR5HMDWC-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak' [-Werror,-Wunused-function]
>    static inline int simple_feature_tweak(struct device_node *node, int type,
>                      ^

This looks unrelated to my patch, but is easily addressed by marking
the function __maybe_unused. The warning is triggered by clang specific
behavior that treats inline functions in .c files differently, see
6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
for W=1 build")

     Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [powerpc:next-test 21/79] arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
  2023-08-18 12:36 ` Arnd Bergmann
@ 2023-08-19  7:04   ` Michael Ellerman
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2023-08-19  7:04 UTC (permalink / raw)
  To: Arnd Bergmann, kernel test robot; +Cc: llvm, linuxppc-dev, oe-kbuild-all

"Arnd Bergmann" <arnd@arndb.de> writes:
> On Fri, Aug 18, 2023, at 09:59, kernel test robot wrote:
>> tree:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git 
>> next-test
>> head:   c56963d48343b50998bacc6df949217c950163e3
>> commit: 54f30b83fe627453082f15d83d7820b28b2d24bb [21/79] powerpc: 
>> address missing-prototypes warnings
>
>>
>> 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@intel.com>
>> | Closes: 
>> https://lore.kernel.org/oe-kbuild-all/202308181501.AR5HMDWC-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>>>> arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak' [-Werror,-Wunused-function]
>>    static inline int simple_feature_tweak(struct device_node *node, int type,
>>                      ^
>
> This looks unrelated to my patch, but is easily addressed by marking
> the function __maybe_unused. The warning is triggered by clang specific
> behavior that treats inline functions in .c files differently, see
> 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> for W=1 build")

It looks like it can just move inside the nearby ifdef. Will send a
patch.

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-19  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18  7:59 [powerpc:next-test 21/79] arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak' kernel test robot
2023-08-18 12:36 ` Arnd Bergmann
2023-08-19  7:04   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).