Skip to content

Commit 960013e

Browse files
nathanchancekees
authored andcommitted
net: qede: Initialize qede_ll_ops with designated initializer
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]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent d872023 commit 960013e

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)