diff options
author | Kees Cook <kees@kernel.org> | 2025-05-02 15:41:57 -0700 |
---|---|---|
committer | Kees Cook <kees@kernel.org> | 2025-05-08 09:42:06 -0700 |
commit | d8720235d5b5cad86c1f07f65117ef2a96f8bec7 (patch) | |
tree | c719cb11c77e5a191e273167e5c1fdd2b7a62f54 | |
parent | 82d76bf938389e23c3826b2859fd6c84fd71366a (diff) |
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>
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 436bd29d5eba..6b1ebab36fa3 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -699,7 +699,7 @@ static u32 qedf_get_login_failures(void *cookie) } static struct qed_fcoe_cb_ops qedf_cb_ops = { - { + .common = { .link_update = qedf_link_update, .bw_update = qedf_bw_update, .schedule_recovery_handler = qedf_schedule_recovery_handler, |