From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] ARM: imx: Add imx5 cpuidle driver
Date: Thu, 3 May 2012 08:39:56 +0200 [thread overview]
Message-ID: <20120503063956.GE4141@pengutronix.de> (raw)
In-Reply-To: <CAMXH7KE1jao1p5ZQ1aw8p7qzOQUftck22QTMKJ1oGwiPhY=FMA@mail.gmail.com>
On Wed, May 02, 2012 at 03:11:35PM -0500, Rob Lee wrote:
> Sascha,
>
> >> ? ? ? mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
> >> ? ? ? mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
> >> - ? ? arm_pm_idle = imx5_idle;
> >> + ? ? arm_pm_idle = (void *)imx5_idle;
> >
> > I don't like this. It will cover all warnings when the prototype of
> > arm_pm_idle changes in future. Better add a static void imx5_idle
> > which calls a static int imx5_do_idle, then you have an idle function
> > which returns an int.
> >
>
> What about using the following:
>
> arm_pm_idle = (void (*)(void))imx5_idle;
>
> This will give warnings if arm_pm_idle prototype changes.
This surely works but will look suspicious for people looking at the
code.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2012-05-03 6:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 2:12 [PATCH v2 0/3] Add imx cpuidle Robert Lee
2012-05-02 2:12 ` [PATCH v2 1/3] ARM: imx: Add common imx cpuidle init functionality Robert Lee
2012-05-02 3:13 ` Shawn Guo
2012-05-02 13:59 ` Rob Lee
2012-05-02 14:07 ` Shawn Guo
2012-05-02 14:09 ` Rob Lee
2012-05-02 7:27 ` Sascha Hauer
2012-05-02 19:16 ` Rob Lee
2012-05-02 20:21 ` Sascha Hauer
2012-05-02 2:12 ` [PATCH v2 2/3] ARM: imx: Add imx5 cpuidle driver Robert Lee
2012-05-02 7:33 ` Sascha Hauer
2012-05-02 20:11 ` Rob Lee
2012-05-03 6:39 ` Sascha Hauer [this message]
2012-05-02 2:12 ` [PATCH v2 3/3] ARM: imx: Add imx6q " Robert Lee
2012-05-02 3:23 ` Shawn Guo
2012-05-02 13:50 ` Rob Lee
2012-05-02 13:53 ` Shawn Guo
2012-05-02 3:03 ` [PATCH v2 0/3] Add imx cpuidle Shawn Guo
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=20120503063956.GE4141@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).