From: Andreas Kemnade <andreas@kemnade.info>
To: Aaro Koskinen <aaro.koskinen@iki.fi>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH 2/2] ARM: omap: cpuidle34xx: Constify state info
Date: Wed, 28 Oct 2026 20:15:12 +0100 [thread overview]
Message-ID: <20261028-susp2-v1-2-174b52857d89@kemnade.info> (raw)
In-Reply-To: <20261028-susp2-v1-0-174b52857d89@kemnade.info>
omap3_idle_statedata is only static read only data,
so have that fact cleary visible.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/mach-omap2/cpuidle34xx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index e42dcf8c03a3..16d2e1f08b48 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -58,7 +58,7 @@ static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
* Prevent PER OFF if CORE is not in RETention or OFF as this would
* disable PER wakeups completely.
*/
-static struct omap3_idle_statedata omap3_idle_data[] = {
+static const struct omap3_idle_statedata omap3_idle_data[] = {
{
.mpu_state = PWRDM_POWER_ON,
.core_state = PWRDM_POWER_ON,
@@ -108,7 +108,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- struct omap3_idle_statedata *cx = &omap3_idle_data[index];
+ const struct omap3_idle_statedata *cx = &omap3_idle_data[index];
int error;
if (omap_irq_pending() || need_resched())
@@ -168,7 +168,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
static int next_valid_state(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
- struct omap3_idle_statedata *cx = &omap3_idle_data[index];
+ const struct omap3_idle_statedata *cx = &omap3_idle_data[index];
u32 mpu_deepest_state = PWRDM_POWER_RET;
u32 core_deepest_state = PWRDM_POWER_RET;
int idx;
@@ -221,7 +221,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
{
int new_state_idx, ret;
u8 per_next_state, per_saved_state;
- struct omap3_idle_statedata *cx;
+ const struct omap3_idle_statedata *cx;
/*
* Use only C1 if CAM is active.
--
2.47.3
prev parent reply other threads:[~2026-10-28 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 19:15 [PATCH 0/2] ARM: omap: cpuidle34xx: Fix unbalanced cpu_pm_enter()/exit() and cleanup Andreas Kemnade
2026-10-28 19:15 ` [PATCH 1/2] ARM: omap: cpuidle34xx: balance cpu_pm_enter/exit() Andreas Kemnade
2026-10-28 20:27 ` Andreas Kemnade
2026-10-28 19:15 ` Andreas Kemnade [this message]
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=20261028-susp2-v1-2-174b52857d89@kemnade.info \
--to=andreas@kemnade.info \
--cc=aaro.koskinen@iki.fi \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rogerq@kernel.org \
--cc=tony@atomide.com \
/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
all inboxes | Powered by JetHome®