Skip to content

Commit d005c81

Browse files
nathanchancegregkh
authored andcommitted
net: qede: Initialize qede_ll_ops with designated initializer
commit 6b3ab7f upstream. After a recent change [1] in clang's randstruct implementation to randomize structures that only contain function pointers, there is an error because qede_ll_ops get randomized but does not use a designated initializer for the first member: drivers/net/ethernet/qlogic/qede/qede_main.c:206:2: error: a randomized struct can only be initialized with a designated initializer 206 | { | ^ Explicitly initialize the common member using a designated initializer to fix the build. Cc: [email protected] Fixes: 035f7f8 ("randstruct: Enable Clang support") Link: llvm/llvm-project@04364fb [1] Signed-off-by: Nathan Chancellor <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 20d6e62 commit d005c81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qede/qede_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static struct pci_driver qede_pci_driver = {
203203
};
204204

205205
static struct qed_eth_cb_ops qede_ll_ops = {
206-
{
206+
.common = {
207207
#ifdef CONFIG_RFS_ACCEL
208208
.arfs_filter_op = qede_arfs_filter_op,
209209
#endif

0 commit comments

Comments
 (0)