mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <llvm@lists.linux.dev>, <kbuild-all@lists.01.org>,
	<linux-kernel@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: drivers/gpio/gpio-virtio.c:23:8: warning: Excessive padding in 'struct virtio_gpio_line' (122 padding bytes, where 58 is optimal).
Date: Tue, 14 Sep 2021 14:21:57 +0800	[thread overview]
Message-ID: <0e2ef91b-a72d-b997-c7de-db8cc5b18137@intel.com> (raw)
In-Reply-To: <202109130045.izxuN5Jn-lkp@intel.com>

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   78e709522d2c012cb0daad2e668506637bffb7c2
commit: 3a29355a22c0275fe864100794fee58a73175d93 gpio: Add virtio-gpio driver
date:   3 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 weeks ago
config: x86_64-randconfig-c007-20210911 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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
         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3a29355a22c0275fe864100794fee58a73175d93
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 3a29355a22c0275fe864100794fee58a73175d93
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 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 >>)

 >> drivers/gpio/gpio-virtio.c:23:8: warning: Excessive padding in 'struct virtio_gpio_line' (122 padding bytes, where 58 is optimal).
    Optimal fields order:
    res,
    rxlen,
    completion,
    lock,
    req,
    consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]


vim +23 drivers/gpio/gpio-virtio.c

3a29355a22c027 Viresh Kumar 2021-08-19  22
3a29355a22c027 Viresh Kumar 2021-08-19 @23  struct virtio_gpio_line {
3a29355a22c027 Viresh Kumar 2021-08-19  24  	struct mutex lock; /* Protects line operation */
3a29355a22c027 Viresh Kumar 2021-08-19  25  	struct completion completion;
3a29355a22c027 Viresh Kumar 2021-08-19  26  	struct virtio_gpio_request req ____cacheline_aligned;
3a29355a22c027 Viresh Kumar 2021-08-19  27  	struct virtio_gpio_response res ____cacheline_aligned;
3a29355a22c027 Viresh Kumar 2021-08-19  28  	unsigned int rxlen;
3a29355a22c027 Viresh Kumar 2021-08-19  29  };
3a29355a22c027 Viresh Kumar 2021-08-19  30

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

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

           reply	other threads:[~2021-09-14  6:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202109130045.izxuN5Jn-lkp@intel.com>]

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=0e2ef91b-a72d-b997-c7de-db8cc5b18137@intel.com \
    --to=yujie.liu@intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=viresh.kumar@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®