mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Colin Ian King <colin.i.king@gmail.com>,
	Hannes Reinecke <hare@suse.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: aic79xx: make read-only array tok_list static const
Date: Tue, 9 Aug 2022 13:04:46 -0700	[thread overview]
Message-ID: <70a33138-1981-f639-c371-b1ffb2378a73@acm.org> (raw)
In-Reply-To: <20220809182518.3046935-1-colin.i.king@gmail.com>

On 8/9/22 11:25, Colin Ian King wrote:
> 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'};

Has it been considered to write the above code as follows?

static const char tok_list[] = ".,{}";

Thanks,

Bart.

      reply	other threads:[~2022-08-09 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:25 Colin Ian King
2022-08-09 20:04 ` Bart Van Assche [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70a33138-1981-f639-c371-b1ffb2378a73@acm.org \
    --to=bvanassche@acm.org \
    --cc=colin.i.king@gmail.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®