[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <045052dc02ce7bbf01dc73bdcd9809cac36b5e51.camel@kernel.org>
Date: Mon, 29 Nov 2021 07:07:02 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Colin Ian King <colin.i.king@...glemail.com>,
Ilya Dryomov <idryomov@...il.com>,
Dongsheng Yang <dongsheng.yang@...ystack.cn>,
Jens Axboe <axboe@...nel.dk>, ceph-devel@...r.kernel.org,
linux-block@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rbd: make const pointer speaces a static const array
On Sat, 2021-11-27 at 17:21 +0000, Colin Ian King wrote:
> Don't populate the const array spaces on the stack but make it static
> const and make the pointer an array to remove a dereference. Shrinks
> object code a little too. Also clean up intent, currently it is spaces
> and should be a tab.
>
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
> drivers/block/rbd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 8f140da1efe3..de7ede6aa95a 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -6189,7 +6189,7 @@ static inline size_t next_token(const char **buf)
> * These are the characters that produce nonzero for
> * isspace() in the "C" and "POSIX" locales.
> */
> - const char *spaces = " \f\n\r\t\v";
> + static const char spaces[] = " \f\n\r\t\v";
>
> *buf += strspn(*buf, spaces); /* Find start of token */
>
Thanks, Colin. Merged into our "testing" branch. It should make v5.17.
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists