Skip to content

Commit af647fe

Browse files
ColinIanKingkuba-moo
authored andcommitted
qlcnic: make read-only const array key static
Don't populate the const read-only array key on the stack at run time, instead make it static. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9ee9262 commit af647fe

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,12 +2042,14 @@ int qlcnic_83xx_config_hw_lro(struct qlcnic_adapter *adapter, int mode)
20422042

20432043
int qlcnic_83xx_config_rss(struct qlcnic_adapter *adapter, int enable)
20442044
{
2045-
int err;
2046-
u32 word;
20472045
struct qlcnic_cmd_args cmd;
2048-
const u64 key[] = { 0xbeac01fa6a42b73bULL, 0x8030f20c77cb2da3ULL,
2049-
0xae7b30b4d0ca2bcbULL, 0x43a38fb04167253dULL,
2050-
0x255b0ec26d5a56daULL };
2046+
static const u64 key[] = {
2047+
0xbeac01fa6a42b73bULL, 0x8030f20c77cb2da3ULL,
2048+
0xae7b30b4d0ca2bcbULL, 0x43a38fb04167253dULL,
2049+
0x255b0ec26d5a56daULL
2050+
};
2051+
u32 word;
2052+
int err;
20512053

20522054
err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_CONFIGURE_RSS);
20532055
if (err)

0 commit comments

Comments
 (0)