* [PATCH] scsi: Replace zero-length array with flexible array member
@ 2024-11-10 15:17 Thorsten Blum
2024-11-10 19:57 ` kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2024-11-10 15:17 UTC (permalink / raw)
To: Lee Duncan, Chris Leech, Mike Christie, James E.J. Bottomley,
Martin K. Petersen
Cc: linux-hardening, Thorsten Blum, open-iscsi, linux-scsi,
linux-kernel
Replace the deprecated zero-length array with a modern flexible array
member in the struct iscsi_bsg_host_vendor_reply.
Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
include/scsi/scsi_bsg_iscsi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/scsi/scsi_bsg_iscsi.h b/include/scsi/scsi_bsg_iscsi.h
index 9b1f0f424a79..df8083f12119 100644
--- a/include/scsi/scsi_bsg_iscsi.h
+++ b/include/scsi/scsi_bsg_iscsi.h
@@ -59,7 +59,7 @@ struct iscsi_bsg_host_vendor {
*/
struct iscsi_bsg_host_vendor_reply {
/* start of vendor response area */
- uint32_t vendor_rsp[0];
+ uint32_t vendor_rsp[];
};
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: Replace zero-length array with flexible array member
2024-11-10 15:17 [PATCH] scsi: Replace zero-length array with flexible array member Thorsten Blum
@ 2024-11-10 19:57 ` kernel test robot
2024-11-10 21:06 ` Gustavo A. R. Silva
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-11-10 19:57 UTC (permalink / raw)
To: Thorsten Blum, Lee Duncan, Chris Leech, Mike Christie,
James E.J. Bottomley, Martin K. Petersen
Cc: oe-kbuild-all, linux-hardening, Thorsten Blum, open-iscsi,
linux-scsi, linux-kernel
Hi Thorsten,
kernel test robot noticed the following build errors:
[auto build test ERROR on jejb-scsi/for-next]
[also build test ERROR on mkp-scsi/for-next linus/master v6.12-rc6 next-20241108]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Thorsten-Blum/scsi-Replace-zero-length-array-with-flexible-array-member/20241110-232327
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link: https://lore.kernel.org/r/20241110151749.3311-2-thorsten.blum%40linux.dev
patch subject: [PATCH] scsi: Replace zero-length array with flexible array member
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241111/202411110336.IDRXgcR4-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241111/202411110336.IDRXgcR4-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411110336.IDRXgcR4-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/scsi/scsi_transport_iscsi.c:23:
>> include/scsi/scsi_bsg_iscsi.h:62:18: error: flexible array member in a struct with no named members
62 | uint32_t vendor_rsp[];
| ^~~~~~~~~~
vim +62 include/scsi/scsi_bsg_iscsi.h
57
58 /* Response:
59 */
60 struct iscsi_bsg_host_vendor_reply {
61 /* start of vendor response area */
> 62 uint32_t vendor_rsp[];
63 };
64
65
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: Replace zero-length array with flexible array member
2024-11-10 19:57 ` kernel test robot
@ 2024-11-10 21:06 ` Gustavo A. R. Silva
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2024-11-10 21:06 UTC (permalink / raw)
To: Thorsten Blum, Lee Duncan, Chris Leech, Mike Christie,
James E.J. Bottomley, Martin K. Petersen
Cc: oe-kbuild-all, linux-hardening, open-iscsi, linux-scsi,
linux-kernel
> In file included from drivers/scsi/scsi_transport_iscsi.c:23:
>>> include/scsi/scsi_bsg_iscsi.h:62:18: error: flexible array member in a struct with no named members
> 62 | uint32_t vendor_rsp[];
> | ^~~~~~~~~~
This won't be an issue in the near future, but for now just use DECLARE_FLEX_ARRAY().
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-10 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-10 15:17 [PATCH] scsi: Replace zero-length array with flexible array member Thorsten Blum
2024-11-10 19:57 ` kernel test robot
2024-11-10 21:06 ` Gustavo A. R. Silva
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.