From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] block: Fix elevator name declaration
Date: Wed, 10 Jul 2019 13:34:15 -0300 [thread overview]
Message-ID: <20190710163415.GB26575@continental> (raw)
In-Reply-To: <20190710155741.11292-1-damien.lemoal@wdc.com>
On Thu, Jul 11, 2019 at 12:57:41AM +0900, Damien Le Moal wrote:
> The elevator_name field in struct elevator_type is declared as an array
> of characters (ELV_NAME_MAX size) but in practice used as a string
> pointer with its initialization done statically within each
> elevator elevator_type structure declaration.
>
> Change the declaration of elevator_name to the more appropriate
> "const char *" type.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
> include/linux/elevator.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/elevator.h b/include/linux/elevator.h
> index 9842e53623f3..b73e6f35fbad 100644
> --- a/include/linux/elevator.h
> +++ b/include/linux/elevator.h
> @@ -75,7 +75,7 @@ struct elevator_type
> size_t icq_size; /* see iocontext.h */
> size_t icq_align; /* ditto */
> struct elv_fs_entry *elevator_attrs;
> - char elevator_name[ELV_NAME_MAX];
> + const char *elevator_name;
> const char *elevator_alias;
> struct module *elevator_owner;
> #ifdef CONFIG_BLK_DEBUG_FS
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> --
> 2.21.0
>
next prev parent reply other threads:[~2019-07-10 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 15:57 [PATCH] block: Fix elevator name declaration Damien Le Moal
2019-07-10 16:34 ` Marcos Paulo de Souza [this message]
2019-07-10 20:06 ` Jens Axboe
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=20190710163415.GB26575@continental \
--to=marcos.souza.org@gmail.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=linux-block@vger.kernel.org \
/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