[gustavoars:testing/wfamnae-next20260302 4/12] drivers/scsi/hisi_sas/hisi_sas.h:617:26: error: field has incomplete type 'struct ssp_command_iu'

From: kernel test robot

Date: Tue Mar 03 2026 - 12:24:42 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20260302
head: 759ff201de93e9bf74683ac6d4414b9141b12c27
commit: 052ea0d6ef438e32950d71cec77517e300b94872 [4/12] scsi: libsas/aci94xx: Avoid multiple -Wflex-array-member-not-at-end warnings
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260304/202603040130.7mpFGwpP-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603040130.7mpFGwpP-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/202603040130.7mpFGwpP-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from drivers/scsi/hisi_sas/hisi_sas_main.c:7:
>> drivers/scsi/hisi_sas/hisi_sas.h:617:26: error: field has incomplete type 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
drivers/scsi/hisi_sas/hisi_sas.h:617:11: note: forward declaration of 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
1 error generated.
--
In file included from drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:7:
>> drivers/scsi/hisi_sas/hisi_sas.h:617:26: error: field has incomplete type 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
drivers/scsi/hisi_sas/hisi_sas.h:617:11: note: forward declaration of 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
>> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1002:11: error: invalid application of 'sizeof' to an incomplete type 'struct ssp_command_iu'
1002 | dw2 = ((sizeof(struct ssp_command_iu) +
| ^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/hisi_sas/hisi_sas.h:617:11: note: forward declaration of 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
2 errors generated.
--
In file included from drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:7:
>> drivers/scsi/hisi_sas/hisi_sas.h:617:26: error: field has incomplete type 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
drivers/scsi/hisi_sas/hisi_sas.h:617:11: note: forward declaration of 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:1779:11: error: invalid application of 'sizeof' to an incomplete type 'struct ssp_command_iu'
1779 | dw2 = (((sizeof(struct ssp_command_iu) + sizeof(struct ssp_frame_hdr)
| ^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/hisi_sas/hisi_sas.h:617:11: note: forward declaration of 'struct ssp_command_iu'
617 | struct ssp_command_iu task;
| ^
2 errors generated.


vim +617 drivers/scsi/hisi_sas/hisi_sas.h

b3cce125cb1e2e Xiang Chen 2019-02-06 610
4ca7fe99fc8485 Yihang Li 2025-04-14 611 #define PROT_BUF_SIZE 7
c799d6bd8fe4a8 John Garry 2015-11-18 612 struct hisi_sas_command_table_ssp {
c799d6bd8fe4a8 John Garry 2015-11-18 613 struct ssp_frame_hdr hdr;
c799d6bd8fe4a8 John Garry 2015-11-18 614 union {
c799d6bd8fe4a8 John Garry 2015-11-18 615 struct {
4ca7fe99fc8485 Yihang Li 2025-04-14 616 u32 prot[PROT_BUF_SIZE];
a0227bfe8d6594 Gustavo A. R. Silva 2025-09-19 @617 struct ssp_command_iu task;
c799d6bd8fe4a8 John Garry 2015-11-18 618 };
c799d6bd8fe4a8 John Garry 2015-11-18 619 struct ssp_tmf_iu ssp_task;
c799d6bd8fe4a8 John Garry 2015-11-18 620 struct xfer_rdy_iu xfer_rdy;
c799d6bd8fe4a8 John Garry 2015-11-18 621 struct ssp_response_iu ssp_res;
c799d6bd8fe4a8 John Garry 2015-11-18 622 } u;
c799d6bd8fe4a8 John Garry 2015-11-18 623 };
c799d6bd8fe4a8 John Garry 2015-11-18 624

:::::: The code at line 617 was first introduced by commit
:::::: a0227bfe8d659406e59a181150f9ff5ce4fda588 scsi: hisi_sas: Avoid a couple -Wflex-array-member-not-at-end warnings

:::::: TO: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
:::::: CC: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

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