LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: <clang-built-linux@googlegroups.com>, <kbuild-all@lists.01.org>,
	<linux-kernel@vger.kernel.org>, Mark Brown <broonie@kernel.org>
Subject: [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is optimal).
Date: Thu, 19 Aug 2021 11:24:02 +0800	[thread overview]
Message-ID: <4dabc78a-f9ee-4e7d-8bf3-ea1c6cef8530@intel.com> (raw)
In-Reply-To: <202108172206.9cbgvI53-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 17362 bytes --]

tree: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   794c7931a2428a656551f2179e6a093233a6e0aa
commit: e7095c35abfc5a5d566941a87434c0fd5ffb570f regulator: core: add 
of_match_full_name boolean flag
date:   9 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 9 months ago
config: arm-randconfig-c002-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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 arm cross compiling tool for clang build
         # apt-get install binutils-arm-linux-gnueabi
         # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e7095c35abfc5a5d566941a87434c0fd5ffb570f
         git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout e7095c35abfc5a5d566941a87434c0fd5ffb570f
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 
ARCH=arm clang-analyzer

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


clang-analyzer warnings: (new ones prefixed by >>)
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    5 warnings generated.
    drivers/regulator/as3722-regulator.c:46:8: warning: Excessive 
padding in 'struct as3722_register_mapping' (14 padding bytes, where 2 
is optimal).
    Optimal fields order:
    name,
    sname,
    n_voltages,
    enable_reg,
    control_reg,
    sleep_ctrl_reg,
    regulator_id,
    vsel_reg,
    vsel_mask,
    enable_mask,
    mode_mask,
    sleep_ctrl_mask,
    consider reordering the fields or adding explicit padding members 
[clang-analyzer-optin.performance.Padding]
    struct as3722_register_mapping {
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/regulator/as3722-regulator.c:46:8: note: Excessive padding 
in 'struct as3722_register_mapping' (14 padding bytes, where 2 is 
optimal). Optimal fields order: name, sname, n_voltages, enable_reg, 
control_reg, sleep_ctrl_reg, regulator_id, vsel_reg, vsel_mask, 
enable_mask, mode_mask, sleep_ctrl_mask, consider reordering the fields 
or adding explicit padding members
    struct as3722_register_mapping {
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    5 warnings generated.
 >> drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive 
padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is 
optimal).
    Optimal fields order:
    dvs,
    additional_inits,
    additional_init_amnt,
    init,
    desc,
    consider reordering the fields or adding explicit padding members 
[clang-analyzer-optin.performance.Padding]
    struct bd718xx_regulator_data {
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    drivers/regulator/bd718x7-regulator.c:531:8: note: Excessive padding 
in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is 
optimal). Optimal fields order: dvs, additional_inits, 
additional_init_amnt, init, desc, consider reordering the fields or 
adding explicit padding members
    struct bd718xx_regulator_data {
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    2 warnings generated.
    Suppressed 2 warnings (2 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    Suppressed 4 warnings (4 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    drivers/gpu/drm/drm_self_refresh_helper.c:85:3: warning: Value 
stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                    ret = -ENOMEM;
                    ^     ~~~~~~~
    drivers/gpu/drm/drm_self_refresh_helper.c:85:3: note: Value stored 
to 'ret' is never read
                    ret = -ENOMEM;
                    ^     ~~~~~~~
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    4 warnings generated.
    drivers/gpu/drm/drm_fb_helper.c:156:24: warning: Value stored to 
'helper' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
            struct drm_fb_helper *helper = info->par;
                                  ^~~~~~   ~~~~~~~~~
    drivers/gpu/drm/drm_fb_helper.c:156:24: note: Value stored to 
'helper' during its initialization is never read
            struct drm_fb_helper *helper = info->par;
                                  ^~~~~~   ~~~~~~~~~
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).
    Use -header-filter=.* to display errors from all non-system headers. 
Use -system-headers to display errors from system headers as well.
    3 warnings generated.
    Suppressed 3 warnings (3 in non-user code).

vim +531 drivers/regulator/bd718x7-regulator.c

ba08799e90b593 drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-05-30  525
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  526  struct reg_init {
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  527  	unsigned int reg;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  528  	unsigned int mask;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  529  	unsigned int val;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  530  };
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14 @531  struct bd718xx_regulator_data {
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  532  	struct regulator_desc desc;
21b72156ede8b7 drivers/regulator/bd718x7-regulator.c Matti Vaittinen 
2020-01-20  533  	const struct rohm_dvs_config dvs;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  534  	const struct reg_init init;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  535  	const struct reg_init *additional_inits;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  536  	int additional_init_amnt;
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  537  };
494edd266b945f drivers/regulator/bd71837-regulator.c Matti Vaittinen 
2018-09-14  538

:::::: The code at line 531 was first introduced by commit
:::::: 494edd266b945f36908184433dd36eda1719cdb0 regulator/mfd: Support 
ROHM BD71847 power management IC

:::::: TO: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
:::::: CC: Mark Brown <broonie@kernel.org>

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


_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26872 bytes --]

       reply	other threads:[~2021-08-19  3:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202108172206.9cbgvI53-lkp@intel.com>
2021-08-19  3:24 ` kernel test robot [this message]
2021-08-19  5:34   ` Matti Vaittinen
2021-08-19 11:37     ` Mark Brown
2021-08-19 14:49     ` kernel test robot
2021-08-19 15:23       ` Mark Brown
2021-08-21  4:38         ` kernel test robot

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=4dabc78a-f9ee-4e7d-8bf3-ea1c6cef8530@intel.com \
    --to=yujie.liu@intel.com \
    --cc=broonie@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=cristian.marussi@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive padding in '\''struct bd718xx_regulator_data'\'' (8 padding bytes, where 0 is optimal).' \
    /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

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).