From: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: drivers/input/touchscreen/ads7846.c:705:24: warning: taking address of packed member 'data' of class or structure 'ads7846_buf' may result in an unaligned pointer value
Date: Sun, 26 Dec 2021 10:58:54 +0800 [thread overview]
Message-ID: <202112261050.OodYJnM4-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e2ae0d4a6b0ba461542f0fd0ba0b828658013e9f
commit: 415e915fdfc775ad0c6675fde1008f6f43dd6251 Merge tag 'v5.11' into next
date: 10 months ago
config: mips-randconfig-r033-20211226 (https://download.01.org/0day-ci/archive/20211226/202112261050.OodYJnM4-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 0c553cc1af2e4c14100df6cf4a6fc91987e778e6)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=415e915fdfc775ad0c6675fde1008f6f43dd6251
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 415e915fdfc775ad0c6675fde1008f6f43dd6251
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/input/touchscreen/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/input/touchscreen/ads7846.c:705:24: warning: taking address of packed member 'data' of class or structure 'ads7846_buf' may result in an unaligned pointer value [-Waddress-of-packed-member]
value = be16_to_cpup(&buf->data);
^~~~~~~~~
1 warning generated.
vim +705 drivers/input/touchscreen/ads7846.c
2991a1ca6e9b13 Jason Wang 2010-10-13 700
6965eece2a89c3 Oleksij Rempel 2021-01-20 701 static int ads7846_get_value(struct ads7846_buf *buf)
2991a1ca6e9b13 Jason Wang 2010-10-13 702 {
879f2fea8a5a74 Andrey Gelman 2015-10-06 703 int value;
2991a1ca6e9b13 Jason Wang 2010-10-13 704
6965eece2a89c3 Oleksij Rempel 2021-01-20 @705 value = be16_to_cpup(&buf->data);
879f2fea8a5a74 Andrey Gelman 2015-10-06 706
879f2fea8a5a74 Andrey Gelman 2015-10-06 707 /* enforce ADC output is 12 bits width */
879f2fea8a5a74 Andrey Gelman 2015-10-06 708 return (value >> 3) & 0xfff;
2991a1ca6e9b13 Jason Wang 2010-10-13 709 }
ffa458c1bd9b6f David Brownell 2006-01-08 710
:::::: The code at line 705 was first introduced by commit
:::::: 6965eece2a89c3f1d00881c6052ee1e987870c08 Input: ads7846 - convert to one message
:::::: TO: Oleksij Rempel <o.rempel@pengutronix.de>
:::::: CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2021-12-26 2:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-26 2:58 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-01-29 16:10 drivers/input/touchscreen/ads7846.c:705:24: warning: taking address of packed member 'data' of class or structure 'ads7846_buf' may result in an unaligned pointer value kernel test robot
2022-01-29 20:30 ` Nathan Chancellor
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=202112261050.OodYJnM4-lkp@intel.com \
--to=lkp@intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox