netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next][V2] qlcnic: make read-only const array key static
@ 2024-09-10 12:06 Colin Ian King
  2024-09-11  8:43 ` Simon Horman
  2024-09-12  0:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2024-09-10 12:06 UTC (permalink / raw)
  To: Shahed Shaikh, Manish Chopra, GR-Linux-NIC-Dev, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev
  Cc: kernel-janitors, linux-kernel

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 <colin.i.king@gmail.com>

---

V2: re-order declarations for reverse christmas tree layout

---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index bcef8ab715bf..d7cdea8f604d 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -2042,12 +2042,14 @@ int qlcnic_83xx_config_hw_lro(struct qlcnic_adapter *adapter, int mode)
 
 int qlcnic_83xx_config_rss(struct qlcnic_adapter *adapter, int enable)
 {
-	int err;
-	u32 word;
 	struct qlcnic_cmd_args cmd;
-	const u64 key[] = { 0xbeac01fa6a42b73bULL, 0x8030f20c77cb2da3ULL,
-			    0xae7b30b4d0ca2bcbULL, 0x43a38fb04167253dULL,
-			    0x255b0ec26d5a56daULL };
+	static const u64 key[] = {
+		0xbeac01fa6a42b73bULL, 0x8030f20c77cb2da3ULL,
+		0xae7b30b4d0ca2bcbULL, 0x43a38fb04167253dULL,
+		0x255b0ec26d5a56daULL
+	};
+	u32 word;
+	int err;
 
 	err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_CONFIGURE_RSS);
 	if (err)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next][V2] qlcnic: make read-only const array key static
  2024-09-10 12:06 [PATCH][next][V2] qlcnic: make read-only const array key static Colin Ian King
@ 2024-09-11  8:43 ` Simon Horman
  2024-09-12  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-09-11  8:43 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Shahed Shaikh, Manish Chopra, GR-Linux-NIC-Dev, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev,
	kernel-janitors, linux-kernel

On Tue, Sep 10, 2024 at 01:06:35PM +0100, Colin Ian King wrote:
> 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 <colin.i.king@gmail.com>
> 
> ---
> 
> V2: re-order declarations for reverse christmas tree layout

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next][V2] qlcnic: make read-only const array key static
  2024-09-10 12:06 [PATCH][next][V2] qlcnic: make read-only const array key static Colin Ian King
  2024-09-11  8:43 ` Simon Horman
@ 2024-09-12  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-12  0:10 UTC (permalink / raw)
  To: Colin Ian King
  Cc: shshaikh, manishc, GR-Linux-NIC-Dev, davem, edumazet, kuba,
	pabeni, netdev, kernel-janitors, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 10 Sep 2024 13:06:35 +0100 you wrote:
> 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 <colin.i.king@gmail.com>
> 
> ---
> 
> [...]

Here is the summary with links:
  - [next,V2] qlcnic: make read-only const array key static
    https://git.kernel.org/netdev/net-next/c/af647fe240a9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-12  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10 12:06 [PATCH][next][V2] qlcnic: make read-only const array key static Colin Ian King
2024-09-11  8:43 ` Simon Horman
2024-09-12  0:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).