public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: Fix elevator name declaration
@ 2019-07-10 15:57 Damien Le Moal
  2019-07-10 16:34 ` Marcos Paulo de Souza
  2019-07-10 20:06 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Damien Le Moal @ 2019-07-10 15:57 UTC (permalink / raw)
  To: linux-block, Jens Axboe

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
-- 
2.21.0


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

end of thread, other threads:[~2019-07-10 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-10 15:57 [PATCH] block: Fix elevator name declaration Damien Le Moal
2019-07-10 16:34 ` Marcos Paulo de Souza
2019-07-10 20:06 ` Jens Axboe

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