* [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static
@ 2026-07-14 16:57 Colin Ian King
2026-07-14 17:05 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2026-07-14 16:57 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Erikas Bitovtas, linux-iio
Cc: kernel-janitors, linux-kernel
Don't populate the read-only const array regulator_names on the stack
at run time, instead make it static const char * const
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/iio/light/vcnl4000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 128ae3f94074..b8ac156ad5c9 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -1922,7 +1922,7 @@ static void vcnl4000_cleanup(void *data)
static int vcnl4000_probe(struct i2c_client *client)
{
- const char * const regulator_names[] = { "vdd", "vio", "vled" };
+ static const char * const regulator_names[] = { "vdd", "vio", "vled" };
struct device *dev = &client->dev;
struct vcnl4000_data *data;
struct iio_dev *indio_dev;
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static
2026-07-14 16:57 [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static Colin Ian King
@ 2026-07-14 17:05 ` Andy Shevchenko
2026-07-20 1:41 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-07-14 17:05 UTC (permalink / raw)
To: Colin Ian King
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Erikas Bitovtas, linux-iio, kernel-janitors, linux-kernel
On Tue, Jul 14, 2026 at 05:57:39PM +0100, Colin Ian King wrote:
> Don't populate the read-only const array regulator_names on the stack
> at run time, instead make it static const char * const
Makes sense
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static
2026-07-14 17:05 ` Andy Shevchenko
@ 2026-07-20 1:41 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-07-20 1:41 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Colin Ian King, David Lechner, Nuno Sá, Andy Shevchenko,
Erikas Bitovtas, linux-iio, kernel-janitors, linux-kernel
On Tue, 14 Jul 2026 20:05:32 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Tue, Jul 14, 2026 at 05:57:39PM +0100, Colin Ian King wrote:
> > Don't populate the read-only const array regulator_names on the stack
> > at run time, instead make it static const char * const
>
> Makes sense
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
Applied.
Thanks
J
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-20 1:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 16:57 [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static Colin Ian King
2026-07-14 17:05 ` Andy Shevchenko
2026-07-20 1:41 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox