All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [linux-next:master 2746/4407] drivers/iio/proximity/vcnl3020.c:62:8: warning: Excessive padding in 'struct vcnl3020_data' (93 padding bytes, where 29 is optimal).
Date: Fri, 30 Jul 2021 07:14:45 +0800	[thread overview]
Message-ID: <202107300737.aPur3uTP-lkp@intel.com> (raw)

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

CC: clang-built-linux(a)googlegroups.com
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Ivan Mikhaylov <i.mikhaylov@yadro.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   4ccc9e2db7ac33f450a1ff6ce158a71e5a81ded9
commit: f5e9e38e7063dbe2c811bb5ee7d255318eb064b3 [2746/4407] iio: proximity: vcnl3020: add DMA safe buffer
:::::: branch date: 7 hours ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-c001-20210728 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c49df15c278857adecd12db6bb1cdc96885f7079)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f5e9e38e7063dbe2c811bb5ee7d255318eb064b3
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout f5e9e38e7063dbe2c811bb5ee7d255318eb064b3
        # 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 >>)
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   9 warnings generated.
   sound/soc/codecs/alc5623.c:700:23: warning: Value stored to 'alc5623' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct alc5623_priv *alc5623 = snd_soc_component_get_drvdata(component);
                                ^~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/alc5623.c:700:23: note: Value stored to 'alc5623' during its initialization is never read
           struct alc5623_priv *alc5623 = snd_soc_component_get_drvdata(component);
                                ^~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 8 warnings (8 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   8 warnings generated.
   sound/soc/codecs/cs35l34.c:260:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = regmap_update_bits(priv->regmap, CS35L34_PWRCTL1,
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/cs35l34.c:260:3: note: Value stored to 'ret' is never read
                   ret = regmap_update_bits(priv->regmap, CS35L34_PWRCTL1,
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   10 warnings generated.
   Suppressed 10 warnings (10 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.
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   Suppressed 5 warnings (5 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.
   8 warnings generated.
>> drivers/iio/proximity/vcnl3020.c:62:8: warning: Excessive padding in 'struct vcnl3020_data' (93 padding bytes, where 29 is optimal). 
   Optimal fields order: 
   buf, 
   rev, 
   regmap, 
   dev, 
   lock, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct vcnl3020_data {
   ~~~~~~~^~~~~~~~~~~~~~~
   drivers/iio/proximity/vcnl3020.c:62:8: note: Excessive padding in 'struct vcnl3020_data' (93 padding bytes, where 29 is optimal). Optimal fields order: buf, rev, regmap, dev, lock, consider reordering the fields or adding explicit padding members
   struct vcnl3020_data {
   ~~~~~~~^~~~~~~~~~~~~~~
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   Suppressed 5 warnings (5 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.
   6 warnings generated.
   Suppressed 6 warnings (6 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   14 warnings generated.
   Suppressed 14 warnings (14 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.
   18 warnings generated.
   include/linux/list.h:100:18: warning: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'head') [clang-analyzer-core.NullDereference]
           __list_add(new, head->prev, head);
                           ^
   net/sctp/outqueue.c:755:6: note: Assuming field 'cork' is 0
           if (q->cork)
               ^~~~~~~
   net/sctp/outqueue.c:755:2: note: Taking false branch
           if (q->cork)
           ^
   net/sctp/outqueue.c:758:2: note: Calling 'sctp_outq_flush'
           sctp_outq_flush(q, 0, gfp);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   net/sctp/outqueue.c:1184:2: note: 'ctx.transport' initialized to a null pointer value
           struct sctp_flush_ctx ctx = {
           ^~~~~~~~~~~~~~~~~~~~~~~~~
   net/sctp/outqueue.c:1202:2: note: Calling 'sctp_outq_flush_ctrl'
           sctp_outq_flush_ctrl(&ctx);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   net/sctp/outqueue.c:879:2: note: Left side of '&&' is false
           list_for_each_entry_safe(chunk, tmp, &ctx->q->control_chunk_list, list) {
           ^
   include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe'
           for (pos = list_first_entry(head, typeof(*pos), member),        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
                                                                      ^
   net/sctp/outqueue.c:879:2: note: Taking false branch
           list_for_each_entry_safe(chunk, tmp, &ctx->q->control_chunk_list, list) {
           ^
   include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe'
           for (pos = list_first_entry(head, typeof(*pos), member),        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ^
   include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   net/sctp/outqueue.c:879:2: note: Loop condition is false.  Exiting loop
           list_for_each_entry_safe(chunk, tmp, &ctx->q->control_chunk_list, list) {
           ^
   include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe'
           for (pos = list_first_entry(head, typeof(*pos), member),        \
                      ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)

vim +62 drivers/iio/proximity/vcnl3020.c

6a878e70e88b53 Ivan Mikhaylov 2021-02-25  53  
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  54  /**
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  55   * struct vcnl3020_data - vcnl3020 specific data.
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  56   * @regmap:	device register map.
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  57   * @dev:	vcnl3020 device.
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  58   * @rev:	revision id.
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  59   * @lock:	lock for protecting access to device hardware registers.
f5e9e38e7063db Ivan Mikhaylov 2021-07-22  60   * @buf:	DMA safe __be16 buffer.
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  61   */
ac101e6b315bfe Ivan Mikhaylov 2020-05-10 @62  struct vcnl3020_data {
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  63  	struct regmap *regmap;
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  64  	struct device *dev;
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  65  	u8 rev;
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  66  	struct mutex lock;
f5e9e38e7063db Ivan Mikhaylov 2021-07-22  67  	__be16 buf ____cacheline_aligned;
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  68  };
ac101e6b315bfe Ivan Mikhaylov 2020-05-10  69  

:::::: The code at line 62 was first introduced by commit
:::::: ac101e6b315bfeb5a4f43a962f589e567855c177 iio: proximity: Add driver support for vcnl3020 proximity sensor

:::::: TO: Ivan Mikhaylov <i.mikhaylov@yadro.com>
:::::: CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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

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

             reply	other threads:[~2021-07-29 23:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 23:14 kernel test robot [this message]
2021-07-30  3:37 ` [linux-next:master 2746/4407] drivers/iio/proximity/vcnl3020.c:62:8: warning: Excessive padding in 'struct vcnl3020_data' (93 padding bytes, where 29 is optimal) kernel test robot
2021-07-30  3:37   ` 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=202107300737.aPur3uTP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.