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:   Tue, 27 Sep 2022 12:49:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/mfd/atmel-smc.c:329:34: warning: 'atmel_smc_ids' defined but
 not used

Hi Miquel,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f76349cf41451c5c42a99f18a9163377e4b364ff
commit: 72c5af00272339af6bbed6fe7275cd731f57be2d mtd: rawnand: Clarify Kconfig entry MTD_NAND
date:   3 years, 5 months ago
config: x86_64-buildonly-randconfig-r005-20220926
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=72c5af00272339af6bbed6fe7275cd731f57be2d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 72c5af00272339af6bbed6fe7275cd731f57be2d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/mfd/ drivers/mtd/nand/raw/atmel/ drivers/regulator/

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

All warnings (new ones prefixed by >>):

     421 |                 if (unlikely(!iter->tags))
         |                 ^~
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/radix-tree.h:423:17: note: in expansion of macro 'if'
     423 |                 if (likely(iter->tags & 1ul)) {
         |                 ^~
   include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
      45 | #  define likely(x)     (__branch_check__(x, 1, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/radix-tree.h:423:21: note: in expansion of macro 'likely'
     423 |                 if (likely(iter->tags & 1ul)) {
         |                     ^~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/radix-tree.h:423:17: note: in expansion of macro 'if'
     423 |                 if (likely(iter->tags & 1ul)) {
         |                 ^~
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/radix-tree.h:443:25: note: in expansion of macro 'if'
     443 |                         if (likely(*slot))
         |                         ^~
   include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
      45 | #  define likely(x)     (__branch_check__(x, 1, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/radix-tree.h:443:29: note: in expansion of macro 'likely'
     443 |                         if (likely(*slot))
         |                             ^~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/radix-tree.h:443:25: note: in expansion of macro 'if'
     443 |                         if (likely(*slot))
         |                         ^~
   arch/x86/include/asm/refcount.h: In function 'refcount_add_not_zero':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   arch/x86/include/asm/refcount.h:103:17: note: in expansion of macro 'if'
     103 |                 if (unlikely(c == 0))
         |                 ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   arch/x86/include/asm/refcount.h:103:21: note: in expansion of macro 'unlikely'
     103 |                 if (unlikely(c == 0))
         |                     ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   arch/x86/include/asm/refcount.h:103:17: note: in expansion of macro 'if'
     103 |                 if (unlikely(c == 0))
         |                 ^~
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   arch/x86/include/asm/refcount.h:109:17: note: in expansion of macro 'if'
     109 |                 if (unlikely(c < 0 || c == INT_MAX || result < c)) {
         |                 ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   arch/x86/include/asm/refcount.h:109:21: note: in expansion of macro 'unlikely'
     109 |                 if (unlikely(c < 0 || c == INT_MAX || result < c)) {
         |                     ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   arch/x86/include/asm/refcount.h:109:17: note: in expansion of macro 'if'
     109 |                 if (unlikely(c < 0 || c == INT_MAX || result < c)) {
         |                 ^~
   At top level:
>> drivers/mfd/atmel-smc.c:329:34: warning: 'atmel_smc_ids' defined but not used [-Wunused-const-variable=]
     329 | static const struct of_device_id atmel_smc_ids[] = {
         |                                  ^~~~~~~~~~~~~
--
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/uio.h:169:9: note: in expansion of macro 'if'
     169 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/uio.h:169:13: note: in expansion of macro 'unlikely'
     169 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/uio.h:169:9: note: in expansion of macro 'if'
     169 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/uio.h: In function 'copy_from_iter_flushcache':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/uio.h:196:9: note: in expansion of macro 'if'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/uio.h:196:13: note: in expansion of macro 'unlikely'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/uio.h:196:9: note: in expansion of macro 'if'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/uio.h: In function 'copy_to_iter_mcsafe':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/uio.h:205:9: note: in expansion of macro 'if'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/uio.h:205:13: note: in expansion of macro 'unlikely'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/uio.h:205:9: note: in expansion of macro 'if'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |         ^~
   include/linux/mtd/mtd.h: In function 'mtd_align_erase_req':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/mtd/mtd.h:498:9: note: in expansion of macro 'if'
     498 |         if (WARN_ON(!mtd->erasesize))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:192:9: note: in expansion of macro 'unlikely'
     192 |         unlikely(__ret_warn_on);                                        \
         |         ^~~~~~~~
   include/linux/mtd/mtd.h:498:13: note: in expansion of macro 'WARN_ON'
     498 |         if (WARN_ON(!mtd->erasesize))
         |             ^~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/mtd/mtd.h:498:9: note: in expansion of macro 'if'
     498 |         if (WARN_ON(!mtd->erasesize))
         |         ^~
   At top level:
>> drivers/mtd/nand/raw/atmel/nand-controller.c:1880:34: warning: 'atmel_ebi_csa_regmap_of_ids' defined but not used [-Wunused-const-variable=]
    1880 | static const struct of_device_id atmel_ebi_csa_regmap_of_ids[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/uio.h:196:9: note: in expansion of macro 'if'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/uio.h:196:13: note: in expansion of macro 'unlikely'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/uio.h:196:9: note: in expansion of macro 'if'
     196 |         if (unlikely(!check_copy_size(addr, bytes, false)))
         |         ^~
   include/linux/uio.h: In function 'copy_to_iter_mcsafe':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/uio.h:205:9: note: in expansion of macro 'if'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/uio.h:205:13: note: in expansion of macro 'unlikely'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/uio.h:205:9: note: in expansion of macro 'if'
     205 |         if (unlikely(!check_copy_size(addr, bytes, true)))
         |         ^~
   include/linux/device.h: In function 'devm_kmalloc_array':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/device.h:688:9: note: in expansion of macro 'if'
     688 |         if (unlikely(check_mul_overflow(n, size, &bytes)))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/linux/device.h:688:13: note: in expansion of macro 'unlikely'
     688 |         if (unlikely(check_mul_overflow(n, size, &bytes)))
         |             ^~~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/device.h:688:9: note: in expansion of macro 'if'
     688 |         if (unlikely(check_mul_overflow(n, size, &bytes)))
         |         ^~
   include/linux/mtd/mtd.h: In function 'mtd_align_erase_req':
   include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("\"_ftrace_annotated_branch\"")' because it conflicts with previous 'section ("\"_ftrace_branch\"")' [-Wattributes]
      25 |                         static struct ftrace_likely_data                \
         |                                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
      69 |                 ______r = !!(cond);                                     \
         |                              ^~~~
   include/linux/mtd/mtd.h:498:9: note: in expansion of macro 'if'
     498 |         if (WARN_ON(!mtd->erasesize))
         |         ^~
   include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
      48 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ^~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:192:9: note: in expansion of macro 'unlikely'
     192 |         unlikely(__ret_warn_on);                                        \
         |         ^~~~~~~~
   include/linux/mtd/mtd.h:498:13: note: in expansion of macro 'WARN_ON'
     498 |         if (WARN_ON(!mtd->erasesize))
         |             ^~~~~~~
   include/linux/compiler.h:64:25: note: previous declaration here
      64 |                         ______f = {                                     \
         |                         ^~~~~~~
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
      56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
         |                       ^~~~~~~~~~
   include/linux/mtd/mtd.h:498:9: note: in expansion of macro 'if'
     498 |         if (WARN_ON(!mtd->erasesize))
         |         ^~
   At top level:
>> drivers/mtd/nand/raw/atmel/pmecc.c:926:34: warning: 'atmel_pmecc_legacy_match' defined but not used [-Wunused-const-variable=]
     926 | static const struct of_device_id atmel_pmecc_legacy_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/atmel_smc_ids +329 drivers/mfd/atmel-smc.c

b0f3ab20e76499 Ludovic Desroches 2017-07-18  328  
b0f3ab20e76499 Ludovic Desroches 2017-07-18 @329  static const struct of_device_id atmel_smc_ids[] = {
b0f3ab20e76499 Ludovic Desroches 2017-07-18  330  	{ .compatible = "atmel,at91sam9260-smc", .data = NULL },
b0f3ab20e76499 Ludovic Desroches 2017-07-18  331  	{ .compatible = "atmel,sama5d3-smc", .data = &sama5d3_reg_layout },
b0f3ab20e76499 Ludovic Desroches 2017-07-18  332  	{ .compatible = "atmel,sama5d2-smc", .data = &sama5d2_reg_layout },
b0f3ab20e76499 Ludovic Desroches 2017-07-18  333  	{ /* sentinel */ },
b0f3ab20e76499 Ludovic Desroches 2017-07-18  334  };
b0f3ab20e76499 Ludovic Desroches 2017-07-18  335  

:::::: The code at line 329 was first introduced by commit
:::::: b0f3ab20e76499db12b0bbadb5737d9870f10418 mfd: syscon: atmel-smc: Add helper to retrieve register layout

:::::: TO: Ludovic Desroches <ludovic.desroches@...rochip.com>
:::::: CC: Lee Jones <lee.jones@...aro.org>

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

View attachment "config" of type "text/plain" (104261 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ