mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nfc: pn544: make array rset_cmd static const
@ 2022-01-09 20:24 Colin Ian King
  2022-01-10  8:28 ` Krzysztof Kozlowski
  2022-01-12  5:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-01-09 20:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Jakub Kicinski, netdev; +Cc: kernel-janitors, linux-kernel

Don't populate the read-only array rset_cmd on the stack but
instead it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/nfc/pn544/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 37d26f01986b..62a0f1a010cb 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -188,7 +188,7 @@ do {								\
 static void pn544_hci_i2c_platform_init(struct pn544_i2c_phy *phy)
 {
 	int polarity, retry, ret;
-	char rset_cmd[] = { 0x05, 0xF9, 0x04, 0x00, 0xC3, 0xE5 };
+	static const char rset_cmd[] = { 0x05, 0xF9, 0x04, 0x00, 0xC3, 0xE5 };
 	int count = sizeof(rset_cmd);
 
 	nfc_info(&phy->i2c_dev->dev, "Detecting nfc_en polarity\n");
-- 
2.32.0


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

* Re: [PATCH] nfc: pn544: make array rset_cmd static const
  2022-01-09 20:24 [PATCH] nfc: pn544: make array rset_cmd static const Colin Ian King
@ 2022-01-10  8:28 ` Krzysztof Kozlowski
  2022-01-12  5:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-10  8:28 UTC (permalink / raw)
  To: Colin Ian King, Jakub Kicinski, netdev; +Cc: kernel-janitors, linux-kernel

On 09/01/2022 21:24, Colin Ian King wrote:
> Don't populate the read-only array rset_cmd on the stack but
> instead it static const. Also makes the object code a little smaller.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/nfc/pn544/i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* Re: [PATCH] nfc: pn544: make array rset_cmd static const
  2022-01-09 20:24 [PATCH] nfc: pn544: make array rset_cmd static const Colin Ian King
  2022-01-10  8:28 ` Krzysztof Kozlowski
@ 2022-01-12  5:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-12  5:20 UTC (permalink / raw)
  To: Colin Ian King
  Cc: krzysztof.kozlowski, kuba, netdev, kernel-janitors, linux-kernel

Hello:

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

On Sun,  9 Jan 2022 20:24:18 +0000 you wrote:
> Don't populate the read-only array rset_cmd on the stack but
> instead it static const. Also makes the object code a little smaller.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/nfc/pn544/i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - nfc: pn544: make array rset_cmd static const
    https://git.kernel.org/netdev/net/c/e110978d6e06

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:[~2022-01-12  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 20:24 [PATCH] nfc: pn544: make array rset_cmd static const Colin Ian King
2022-01-10  8:28 ` Krzysztof Kozlowski
2022-01-12  5:20 ` 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

Powered by JetHome