All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Michael Zaidman <michael.zaidman@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: drivers/hid/hid-ft260.c:879:1: warning: taking address of packed member 'clock' of class or structure 'ft260_get_i2c_status_report' may result in an unaligned pointer value
Date: Wed, 5 Jan 2022 23:17:34 +0800	[thread overview]
Message-ID: <202201052330.GECx4YSO-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date:   10 months ago
config: mips-randconfig-r036-20220105 (https://download.01.org/0day-ci/archive/20220105/202201052330.GECx4YSO-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
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=6a82582d9fa438045191074856f47165334f2777
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 6a82582d9fa438045191074856f47165334f2777
        # 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/hid/ drivers/usb/gadget/ fs/

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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
                   hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
                                                                           ^~~
   include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
           dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
                                       ^~~~~~~~~~~
   include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                         ^~~~~~~~~~~
   drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
           int len, ret;
                  ^
                   = 0
>> drivers/hid/hid-ft260.c:879:1: warning: taking address of packed member 'clock' of class or structure 'ft260_get_i2c_status_report' may result in an unaligned pointer value [-Waddress-of-packed-member]
   FT260_I2CST_ATTR_SHOW(clock);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-ft260.c:814:3: note: expanded from macro 'FT260_I2CST_ATTR_SHOW'
                   FT260_ATTR_SHOW(name, ft260_get_i2c_status_report,             \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-ft260.c:803:18: note: expanded from macro 'FT260_ATTR_SHOW'
                   type *field = &rep.name;                                       \
                                  ^~~~~~~~
   2 warnings generated.


vim +879 drivers/hid/hid-ft260.c

   878	
 > 879	FT260_I2CST_ATTR_SHOW(clock);
   880	FT260_WORD_ATTR_STORE(clock, ft260_set_i2c_speed_report,
   881			      FT260_SET_I2C_CLOCK_SPEED);
   882	static DEVICE_ATTR_RW(clock);
   883	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/hid/hid-ft260.c:879:1: warning: taking address of packed member 'clock' of class or structure 'ft260_get_i2c_status_report' may result in an unaligned pointer value
Date: Wed, 05 Jan 2022 23:17:34 +0800	[thread overview]
Message-ID: <202201052330.GECx4YSO-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date:   10 months ago
config: mips-randconfig-r036-20220105 (https://download.01.org/0day-ci/archive/20220105/202201052330.GECx4YSO-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
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=6a82582d9fa438045191074856f47165334f2777
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 6a82582d9fa438045191074856f47165334f2777
        # 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/hid/ drivers/usb/gadget/ fs/

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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
                   hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
                                                                           ^~~
   include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
           dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
                                       ^~~~~~~~~~~
   include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                         ^~~~~~~~~~~
   drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
           int len, ret;
                  ^
                   = 0
>> drivers/hid/hid-ft260.c:879:1: warning: taking address of packed member 'clock' of class or structure 'ft260_get_i2c_status_report' may result in an unaligned pointer value [-Waddress-of-packed-member]
   FT260_I2CST_ATTR_SHOW(clock);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-ft260.c:814:3: note: expanded from macro 'FT260_I2CST_ATTR_SHOW'
                   FT260_ATTR_SHOW(name, ft260_get_i2c_status_report,             \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-ft260.c:803:18: note: expanded from macro 'FT260_ATTR_SHOW'
                   type *field = &rep.name;                                       \
                                  ^~~~~~~~
   2 warnings generated.


vim +879 drivers/hid/hid-ft260.c

   878	
 > 879	FT260_I2CST_ATTR_SHOW(clock);
   880	FT260_WORD_ATTR_STORE(clock, ft260_set_i2c_speed_report,
   881			      FT260_SET_I2C_CLOCK_SPEED);
   882	static DEVICE_ATTR_RW(clock);
   883	

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

             reply	other threads:[~2022-01-05 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 15:17 kernel test robot [this message]
2022-01-05 15:17 ` drivers/hid/hid-ft260.c:879:1: warning: taking address of packed member 'clock' of class or structure 'ft260_get_i2c_status_report' may result in an unaligned pointer value kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-09-11 16:50 kernel test robot
2021-09-11 16:50 ` 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=202201052330.GECx4YSO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jkosina@suse.cz \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=michael.zaidman@gmail.com \
    /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.