From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: imx: build cpu_is_imx6sl function conditionally
Date: Fri, 4 Jul 2014 09:59:51 +0800 [thread overview]
Message-ID: <20140704015949.GI30239@dragon> (raw)
In-Reply-To: <53B5983A.8030107@cogentembedded.com>
On Thu, Jul 03, 2014 at 09:51:54PM +0400, Sergei Shtylyov wrote:
> >@@ -156,7 +156,11 @@ extern unsigned int __mxc_cpu_type;
> > #ifndef __ASSEMBLY__
> > static inline bool cpu_is_imx6sl(void)
> > {
> >+#ifdef CONFIG_SOC_IMX6SL
> > return __mxc_cpu_type == MXC_CPU_IMX6SL;
> >+#else
> >+ return 0;
>
> s/0/false/.
>
> >+#endif
>
> Also, #ifdef's in a function body are ugly.
Okay, I fixed it up as below.
#ifdef CONFIG_SOC_IMX6SL
static inline bool cpu_is_imx6sl(void)
{
return __mxc_cpu_type == MXC_CPU_IMX6SL;
}
#else
static inline bool cpu_is_imx6sl(void)
{
return false;
}
#endif
Shawn
prev parent reply other threads:[~2014-07-04 1:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 14:22 [PATCH] ARM: imx: build cpu_is_imx6sl function conditionally Arnd Bergmann
2014-07-03 14:35 ` Shawn Guo
2014-07-03 17:51 ` Sergei Shtylyov
2014-07-04 1:59 ` Shawn Guo [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=20140704015949.GI30239@dragon \
--to=shawn.guo@freescale.com \
--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 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.