pcmcia: rsrc_nonstatic: make static read-only array order const
Subsystems (2)
PATCH 1/1 pcmcia: rsrc_nonstatic: make static read-only array order const
The static array is order read-only so it make sense to make it const.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/pcmcia/rsrc_nonstatic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pcmcia/rsrc_nonstatic.c +1 -1
@@ -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;
Signature · 1 line
2.33.1
Dominik Brodowski
maintainerAm Sun, Jan 23, 2022 at 11:34:03PM +0000 schrieb Colin Ian King:
Quoted 4 lines
The static array is order read-only so it make sense to make it const.
Signed-off-by Colin Ian King <[email protected]>
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