linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] power: supply: bd99954: make read-only array sub_status_reg
@ 2023-06-27 12:17 Colin Ian King
  2023-06-27 12:38 ` Matti Vaittinen
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2023-06-27 12:17 UTC (permalink / raw)
  To: Matti Vaittinen, Sebastian Reichel, linux-pm
  Cc: kernel-janitors, linux-kernel

Don't populate the read-only array on the stack, instead make it
static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/power/supply/bd99954-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/bd99954-charger.c b/drivers/power/supply/bd99954-charger.c
index 086dcf4033c1..1ed1d9f99fb3 100644
--- a/drivers/power/supply/bd99954-charger.c
+++ b/drivers/power/supply/bd99954-charger.c
@@ -536,7 +536,7 @@ static irqreturn_t bd9995x_irq_handler_thread(int irq, void *private)
 
 	for_each_set_bit(i, &tmp, 7) {
 		int sub_status, sub_mask;
-		int sub_status_reg[] = {
+		static const int sub_status_reg[] = {
 			INT1_STATUS, INT2_STATUS, INT3_STATUS, INT4_STATUS,
 			INT5_STATUS, INT6_STATUS, INT7_STATUS,
 		};
-- 
2.39.2


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

* Re: [PATCH][next] power: supply: bd99954: make read-only array sub_status_reg
  2023-06-27 12:17 [PATCH][next] power: supply: bd99954: make read-only array sub_status_reg Colin Ian King
@ 2023-06-27 12:38 ` Matti Vaittinen
  2023-07-19 21:14   ` Sebastian Reichel
  0 siblings, 1 reply; 3+ messages in thread
From: Matti Vaittinen @ 2023-06-27 12:38 UTC (permalink / raw)
  To: Colin Ian King, Sebastian Reichel, linux-pm; +Cc: kernel-janitors, linux-kernel

On 6/27/23 15:17, Colin Ian King wrote:
> Don't populate the read-only array on the stack, instead make it
> static const.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

Thanks!

Yours,
-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~


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

* Re: [PATCH][next] power: supply: bd99954: make read-only array sub_status_reg
  2023-06-27 12:38 ` Matti Vaittinen
@ 2023-07-19 21:14   ` Sebastian Reichel
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2023-07-19 21:14 UTC (permalink / raw)
  To: Matti Vaittinen; +Cc: Colin Ian King, linux-pm, kernel-janitors, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Hi,

On Tue, Jun 27, 2023 at 03:38:35PM +0300, Matti Vaittinen wrote:
> On 6/27/23 15:17, Colin Ian King wrote:
> > Don't populate the read-only array on the stack, instead make it
> > static const.
> > 
> > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> 
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

Thanks, queued.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-07-19 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 12:17 [PATCH][next] power: supply: bd99954: make read-only array sub_status_reg Colin Ian King
2023-06-27 12:38 ` Matti Vaittinen
2023-07-19 21:14   ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).