All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [lunn:v6.3-rc6-net-next-zii 13/14] drivers/platform/x86/scu.c:1321:27: warning: 'ichx_gpiolib_names' defined but not used
Date: Mon, 17 Apr 2023 07:15:51 +0800	[thread overview]
Message-ID: <202304170741.AzJCd8u0-lkp@intel.com> (raw)

tree:   https://github.com/lunn/linux.git v6.3-rc6-net-next-zii
head:   22f16af6fd80efa023ad3545ae6b1cf34516d51a
commit: c91f52b66c5d11604c5e47dd29970962d1d05225 [13/14] platform: x86: scu: Add missing static's
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20230417/202304170741.AzJCd8u0-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/lunn/linux/commit/c91f52b66c5d11604c5e47dd29970962d1d05225
        git remote add lunn https://github.com/lunn/linux.git
        git fetch --no-tags lunn v6.3-rc6-net-next-zii
        git checkout c91f52b66c5d11604c5e47dd29970962d1d05225
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304170741.AzJCd8u0-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/platform/x86/scu.c: In function 'scu_populate_unit_info':
   drivers/platform/x86/scu.c:1775:17: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1775 |                 ;
         |                 ^
   drivers/platform/x86/scu.c:1778:17: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1778 |                 ;
         |                 ^
   At top level:
>> drivers/platform/x86/scu.c:1321:27: warning: 'ichx_gpiolib_names' defined but not used [-Wunused-const-variable=]
    1321 | static const char * const ichx_gpiolib_names[128] = {
         |                           ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:254,
                    from drivers/platform/x86/scu.c:25:
   In function 'strncpy',
       inlined from 'scu_object_store' at drivers/platform/x86/scu.c:271:2:
   include/linux/fortify-string.h:68:33: warning: '__builtin_strncpy' output may be truncated copying between 7 and 11 bytes from a string of length 11 [-Wstringop-truncation]
      68 | #define __underlying_strncpy    __builtin_strncpy
         |                                 ^
   include/linux/fortify-string.h:151:16: note: in expansion of macro '__underlying_strncpy'
     151 |         return __underlying_strncpy(p, q, size);
         |                ^~~~~~~~~~~~~~~~~~~~


vim +/ichx_gpiolib_names +1321 drivers/platform/x86/scu.c

  1319	
  1320	/* SCU specific gpio pin names. Only works if module is built into kernel. */
> 1321	static const char * const ichx_gpiolib_names[128] = {
  1322		[0] = "switch_interrupt",	/* GPI0 */
  1323		[3] = "ac_loss_detect",		/* GPI3 */
  1324		[16] = "debug_out",		/* GPO0 */
  1325		[20] = "switch_reset",		/* GPO3 */
  1326	};
  1327	

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

                 reply	other threads:[~2023-04-16 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202304170741.AzJCd8u0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.