Messages in this thread | | | Date | Sun, 12 Sep 2021 00:50:36 +0800 | From | kernel test robot <> | 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 |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 926de8c4326c14fcf35f1de142019043597a4fac commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver date: 6 months ago config: i386-randconfig-a015-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=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 attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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 >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument] In file included from drivers/hid/hid-ft260.c:12: In file included from include/linux/hidraw.h:8: In file included from include/uapi/linux/hidraw.h:19: In file included from include/linux/hid.h:19: In file included from include/linux/slab.h:15: In file included from include/linux/gfp.h:6: In file included from include/linux/mmzone.h:8: In file included from include/linux/spinlock.h:51: In file included from include/linux/preempt.h:78: In file included from arch/x86/include/asm/preempt.h:7: In file included from include/linux/thread_info.h:58: arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address] oldframe = __builtin_frame_address(1); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address] frame = __builtin_frame_address(2); ^~~~~~~~~~~~~~~~~~~~~~~~~~ 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; \ ^~~~~~~~ 4 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 [unhandled content-type:application/gzip] | |