Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops

Recent fixes to the randstruct GCC plugin allowed it to notice
that this structure is entirely function pointers and is therefore
subject to randomization, but doing so requires that it always use
designated initializers. Explicitly specify the "common" member as being
initialized. Silences:

drivers/scsi/qedf/qedf_main.c:702:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
702 | {
| ^

Fixes: 035f7f87b729 ("randstruct: Enable Clang support")
Link: https://lore.kernel.org/r/20250502224156.work.617-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

+1 -1
+1 -1
drivers/scsi/qedf/qedf_main.c
··· 699 699 } 700 700 701 701 static struct qed_fcoe_cb_ops qedf_cb_ops = { 702 - { 702 + .common = { 703 703 .link_update = qedf_link_update, 704 704 .bw_update = qedf_bw_update, 705 705 .schedule_recovery_handler = qedf_schedule_recovery_handler,