diff options
| author | Colin Ian King <colin.i.king@gmail.com> | 2026-07-14 19:56:24 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 14:54:44 +0200 |
| commit | a477830bc2d615fa0dfd52508d8c94cec6721299 (patch) | |
| tree | fa6b6f08620bbc3c6eb65f7134d680f7e14335f4 | |
| parent | a432f68c51fc6761658445e80a798b8425fdb3dc (diff) | |
| download | linux-next-a477830bc2d615fa0dfd52508d8c94cec6721299.tar.gz linux-next-a477830bc2d615fa0dfd52508d8c94cec6721299.zip | |
uio: make read-only const array porttypes static
Don't populate the read-only const array porttypes on the stack
at run time, instead make it static const char * const
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20260714185624.192829-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/uio/uio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index e77d5e7d5f64..f8fa20522660 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -150,7 +150,7 @@ static ssize_t portio_size_show(struct uio_port *port, char *buf) static ssize_t portio_porttype_show(struct uio_port *port, char *buf) { - const char *porttypes[] = {"none", "x86", "gpio", "other"}; + static const char * const porttypes[] = {"none", "x86", "gpio", "other"}; if ((port->porttype < 0) || (port->porttype > UIO_PORT_OTHER)) return -EINVAL; |
