mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: aic79xx: make read-only array tok_list static const
@ 2022-08-09 18:25 Colin Ian King
  2022-08-09 20:04 ` Bart Van Assche
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-08-09 18:25 UTC (permalink / raw)
  To: Hannes Reinecke, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi
  Cc: kernel-janitors, linux-kernel

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

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

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 928099163f0f..4ed40e6c5522 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -1044,7 +1044,7 @@ ahd_parse_brace_option(char *opt_name, char *opt_arg, char *end, int depth,
 	int      instance;
 	int	 targ;
 	int	 done;
-	char	 tok_list[] = {'.', ',', '{', '}', '\0'};
+	static const char tok_list[] = {'.', ',', '{', '}', '\0'};
 
 	/* All options use a ':' name/arg separator */
 	if (*opt_arg != ':')
-- 
2.35.3


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

end of thread, other threads:[~2022-08-09 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 18:25 [PATCH] scsi: aic79xx: make read-only array tok_list static const Colin Ian King
2022-08-09 20:04 ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®