From: Michael Ellerman <michael@ellerman.id.au>
To: Paul Mackerras <paulus@samba.org>, <linuxppc-dev@ozlabs.org>
Subject: [PATCH 2/4] powerpc: Change firmware_has_feature() to a macro
Date: Thu, 23 Mar 2006 23:33:03 +1100 [thread overview]
Message-ID: <20060323123339.F055967B39@ozlabs.org> (raw)
In-Reply-To: <1143117144.850591.48752080269.qpush@concordia>
So that we can use firmware_has_feature() in a BUG_ON() and have the compiler
elide the code entirely if the feature can never be set, change
firmware_has_feature to a macro. Unfortunate, but necessary at least until
GCC bug #26724 is fixed.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
include/asm-powerpc/firmware.h | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
Index: to-merge/include/asm-powerpc/firmware.h
===================================================================
--- to-merge.orig/include/asm-powerpc/firmware.h
+++ to-merge/include/asm-powerpc/firmware.h
@@ -84,11 +84,9 @@ enum {
*/
extern unsigned long ppc64_firmware_features;
-static inline unsigned long firmware_has_feature(unsigned long feature)
-{
- return (FW_FEATURE_ALWAYS & feature) ||
- (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature);
-}
+#define firmware_has_feature(feature) \
+ ((FW_FEATURE_ALWAYS & (feature)) || \
+ (FW_FEATURE_POSSIBLE & ppc64_firmware_features & (feature)))
extern void system_reset_fwnmi(void);
extern void machine_check_fwnmi(void);
next prev parent reply other threads:[~2006-03-23 12:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-23 12:32 [PATCH 1/4] powerpc: Make BUG_ON & WARN_ON play nice with compile-time optimisations Michael Ellerman
2006-03-23 12:33 ` Michael Ellerman [this message]
2006-03-23 12:33 ` [PATCH 3/4] powerpc: Rename and export ppc64_firmware_features Michael Ellerman
2006-03-23 13:17 ` Stephen Rothwell
2006-03-23 23:40 ` [PATCH] " Michael Ellerman
2006-03-23 12:33 ` [PATCH 4/4] powerpc: Cope with duplicate node & property names in /proc/device-tree Michael Ellerman
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=20060323123339.F055967B39@ozlabs.org \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).