From: Kevin Hilman <khilman@deeprootsystems.com>
To: Sanjeev Premi <premi@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP3: PM: Fix compile time warning and errors
Date: Wed, 30 Sep 2009 11:43:44 -0700 [thread overview]
Message-ID: <873a64mfxb.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1253274532-29002-1-git-send-email-premi@ti.com> (Sanjeev Premi's message of "Fri\, 18 Sep 2009 17\:18\:52 +0530")
Sanjeev Premi <premi@ti.com> writes:
> Made a mistake of enabling PM_DEBUG without DEBUG_FS. This leads to
> compile time warnings and errors.
>
> arch/arm/mach-omap2/pm-debug.c:56: warning: 'pm_dbg_init'
> declared 'static' but never defined
>
> arch/arm/mach-omap2/built-in.o: In function `omap_sram_idle':
> arch/arm/mach-omap2/pm34xx.c:442: undefined reference to
> 'pm_dbg_regset_save'
> arch/arm/mach-omap2/built-in.o: In function `configure_vc':
> arch/arm/mach-omap2/pm34xx.c:1221: undefined reference to
> 'pm_dbg_regset_init'
>
> Another alternate is to link these Kconfig options; but didn't seem
> intuitive.
>
> Signed-off-by: Sanjeev Premi <premi@ti.com>
> ---
> arch/arm/mach-omap2/pm-debug.c | 2 ++
> arch/arm/mach-omap2/pm34xx.c | 4 ++++
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 1b4c160..175d461 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -53,7 +53,9 @@ int omap2_pm_debug;
> regs[reg_count].name = #reg; \
> regs[reg_count++].val = __raw_readl(OMAP2_IO_ADDRESS(0x480fe000 + (off)))
>
> +#ifdef CONFIG_DEBUG_FS
> static int __init pm_dbg_init(void);
> +#endif
Move this into the other #ifdef CONFIG_DEBUG_FS later in the same file.
> void omap2_pm_dump(int mode, int resume, unsigned int us)
> {
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 7a1eb95..e3da0ab 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -438,8 +438,10 @@ void omap_sram_idle(void)
> core_next_state == PWRDM_POWER_OFF)
> sdrc_pwr = sdrc_read_reg(SDRC_POWER);
>
> +#ifdef CONFIG_DEBUG_FS
> if (regset_save_on_suspend)
> pm_dbg_regset_save(1);
> +#endif
I don't like the #ifdefs here...
>
> /*
> * omap3_arm_context is the location where ARM registers
> @@ -1218,7 +1220,9 @@ static void __init configure_vc(void)
> prm_write_mod_reg(prm_setup.voltsetup2, OMAP3430_GR_MOD,
> OMAP3_PRM_VOLTSETUP2_OFFSET);
>
> +#ifdef CONFIG_DEBUG_FS
> pm_dbg_regset_init(1);
> +#endif
or here.
how about just adding dummy functions in pm-debug.c like this (on top
of your patch), then these #ifdefs can go away.
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 175d461..99855aa 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -578,4 +578,6 @@ arch_initcall(pm_dbg_init);
#else
void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) {}
+int pm_dbg_regset_save(int reg_set) { return 0; }
+int pm_dbg_regset_init(int reg_set) { return 0; }
#endif
prev parent reply other threads:[~2009-09-30 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 11:48 [PATCH] OMAP3: PM: Fix compile time warning and errors Sanjeev Premi
2009-09-30 18:43 ` Kevin Hilman [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=873a64mfxb.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=premi@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.