* [PATCH] pcmcia: rsrc_nonstatic: make static read-only array order const
@ 2022-01-23 23:34 Colin Ian King
2022-02-05 10:13 ` Dominik Brodowski
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-01-23 23:34 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: kernel-janitors, linux-kernel
The static array is order read-only so it make sense to make
it const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/pcmcia/rsrc_nonstatic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 6b6c578b5f92..bde377655d48 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -480,7 +480,7 @@ static u_long inv_probe(struct resource_map *m, struct pcmcia_socket *s)
static int validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
{
struct resource_map *m, mm;
- static unsigned char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
+ static const unsigned char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
unsigned long b, i, ok = 0;
struct socket_data *s_data = s->resource_data;
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pcmcia: rsrc_nonstatic: make static read-only array order const
2022-01-23 23:34 [PATCH] pcmcia: rsrc_nonstatic: make static read-only array order const Colin Ian King
@ 2022-02-05 10:13 ` Dominik Brodowski
0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2022-02-05 10:13 UTC (permalink / raw)
To: Colin Ian King; +Cc: kernel-janitors, linux-kernel
Am Sun, Jan 23, 2022 at 11:34:03PM +0000 schrieb Colin Ian King:
> The static array is order read-only so it make sense to make
> it const.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
If it's read-only, it doesn't need to be static, right? Could you
update the patch and replace the static with const, please?
Thanks,
Dominik
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-05 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 23:34 [PATCH] pcmcia: rsrc_nonstatic: make static read-only array order const Colin Ian King
2022-02-05 10:13 ` Dominik Brodowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.