drivers/scsi/pm8001/pm80xx_hwi.h:639:2: warning: field within 'struct smp_req' is less aligned than 'union smp_req::(anonymous at drivers/scsi/pm8001/pm80xx_hwi.h:639:2)' and is usually due to 'struct smp_req' being packed, which can lead to unaligned ac...

From: kernel test robot
Date: Sun Jun 25 2023 - 18:38:20 EST


Hi Arnd,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 547cc9be86f4c51c51fd429ace6c2e1ef9050d15
commit: 7036440eab3e2d47a775d4616909f8235488d714 ARM: omap1: enable multiplatform
date: 1 year, 1 month ago
config: arm-randconfig-r026-20230626 (https://download.01.org/0day-ci/archive/20230626/202306260618.P3XlR5N7-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230626/202306260618.P3XlR5N7-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306260618.P3XlR5N7-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from drivers/scsi/pm8001/pm80xx_hwi.c:42:
>> drivers/scsi/pm8001/pm80xx_hwi.h:639:2: warning: field within 'struct smp_req' is less aligned than 'union smp_req::(anonymous at drivers/scsi/pm8001/pm80xx_hwi.h:639:2)' and is usually due to 'struct smp_req' being packed, which can lead to unaligned accesses [-Wunaligned-access]
639 | union {
| ^
1 warning generated.
--
In file included from drivers/scsi/pm8001/pm8001_hwi.c:42:
>> drivers/scsi/pm8001/pm8001_hwi.h:402:2: warning: field within 'struct smp_req' is less aligned than 'union smp_req::(anonymous at drivers/scsi/pm8001/pm8001_hwi.h:402:2)' and is usually due to 'struct smp_req' being packed, which can lead to unaligned accesses [-Wunaligned-access]
402 | union {
| ^
1 warning generated.
--
>> arch/arm/mm/copypage-feroceon.c:65:6: warning: no previous prototype for function 'feroceon_copy_user_highpage' [-Wmissing-prototypes]
65 | void feroceon_copy_user_highpage(struct page *to, struct page *from,
| ^
arch/arm/mm/copypage-feroceon.c:65:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
65 | void feroceon_copy_user_highpage(struct page *to, struct page *from,
| ^
| static
>> arch/arm/mm/copypage-feroceon.c:78:6: warning: no previous prototype for function 'feroceon_clear_user_highpage' [-Wmissing-prototypes]
78 | void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr)
| ^
arch/arm/mm/copypage-feroceon.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
78 | void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr)
| ^
| static
2 warnings generated.


vim +639 drivers/scsi/pm8001/pm80xx_hwi.h

f5860992db55c9 Sakthivel K 2013-04-17 624
f5860992db55c9 Sakthivel K 2013-04-17 625 /*
f5860992db55c9 Sakthivel K 2013-04-17 626 * brief the data structure of SMP Request Command
f5860992db55c9 Sakthivel K 2013-04-17 627 * use to describe MPI SMP REQUEST Command (64 bytes)
f5860992db55c9 Sakthivel K 2013-04-17 628 */
f5860992db55c9 Sakthivel K 2013-04-17 629 struct smp_req {
f5860992db55c9 Sakthivel K 2013-04-17 630 __le32 tag;
f5860992db55c9 Sakthivel K 2013-04-17 631 __le32 device_id;
f5860992db55c9 Sakthivel K 2013-04-17 632 __le32 len_ip_ir;
f5860992db55c9 Sakthivel K 2013-04-17 633 /* Bits [0] - Indirect response */
f5860992db55c9 Sakthivel K 2013-04-17 634 /* Bits [1] - Indirect Payload */
f5860992db55c9 Sakthivel K 2013-04-17 635 /* Bits [15:2] - Reserved */
f5860992db55c9 Sakthivel K 2013-04-17 636 /* Bits [23:16] - direct payload Len */
f5860992db55c9 Sakthivel K 2013-04-17 637 /* Bits [31:24] - Reserved */
f5860992db55c9 Sakthivel K 2013-04-17 638 u8 smp_req16[16];
f5860992db55c9 Sakthivel K 2013-04-17 @639 union {
f5860992db55c9 Sakthivel K 2013-04-17 640 u8 smp_req[32];
f5860992db55c9 Sakthivel K 2013-04-17 641 struct {
f5860992db55c9 Sakthivel K 2013-04-17 642 __le64 long_req_addr;/* sg dma address, LE */
f5860992db55c9 Sakthivel K 2013-04-17 643 __le32 long_req_size;/* LE */
f5860992db55c9 Sakthivel K 2013-04-17 644 u32 _r_a;
f5860992db55c9 Sakthivel K 2013-04-17 645 __le64 long_resp_addr;/* sg dma address, LE */
f5860992db55c9 Sakthivel K 2013-04-17 646 __le32 long_resp_size;/* LE */
f5860992db55c9 Sakthivel K 2013-04-17 647 u32 _r_b;
f5860992db55c9 Sakthivel K 2013-04-17 648 } long_smp_req;/* sequencer extension */
f5860992db55c9 Sakthivel K 2013-04-17 649 };
f5860992db55c9 Sakthivel K 2013-04-17 650 __le32 rsvd[16];
f5860992db55c9 Sakthivel K 2013-04-17 651 } __attribute__((packed, aligned(4)));
f5860992db55c9 Sakthivel K 2013-04-17 652 /*
f5860992db55c9 Sakthivel K 2013-04-17 653 * brief the data structure of SMP Completion Response
f5860992db55c9 Sakthivel K 2013-04-17 654 * use to describe MPI SMP Completion Response (64 bytes)
f5860992db55c9 Sakthivel K 2013-04-17 655 */
f5860992db55c9 Sakthivel K 2013-04-17 656 struct smp_completion_resp {
f5860992db55c9 Sakthivel K 2013-04-17 657 __le32 tag;
f5860992db55c9 Sakthivel K 2013-04-17 658 __le32 status;
f5860992db55c9 Sakthivel K 2013-04-17 659 __le32 param;
f5860992db55c9 Sakthivel K 2013-04-17 660 u8 _r_a[252];
f5860992db55c9 Sakthivel K 2013-04-17 661 } __attribute__((packed, aligned(4)));
f5860992db55c9 Sakthivel K 2013-04-17 662

:::::: The code at line 639 was first introduced by commit
:::::: f5860992db55c9e36b0f120dff73f0c34abe510d [SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files

:::::: TO: Sakthivel K <Sakthivel.SaravananKamalRaju@xxxxxxxx>
:::::: CC: James Bottomley <JBottomley@xxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki