From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [FIX REQUEST] x86: Remove avoidable multiple ifdef blocks
Date: Mon, 13 Jul 2009 12:45:12 +0530 [thread overview]
Message-ID: <1247469312.2525.5.camel@ht.satnam> (raw)
In -tip there are many instances where multiple ifdefs are used which
can be easily avoidable to make core more readable and consistent.
Like multiple 'ifdef __KERNEL__' in asm/bitops.h :
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 02b47a6..477f556 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -434,11 +434,6 @@ static inline int fls(int x)
#endif
return r + 1;
}
-#endif /* __KERNEL__ */
-
-#undef ADDR
-
-#ifdef __KERNEL__
#include <asm-generic/bitops/sched.h>
@@ -446,12 +441,6 @@ static inline int fls(int x)
#include <asm-generic/bitops/hweight.h>
-#endif /* __KERNEL__ */
-
-#include <asm-generic/bitops/fls64.h>
-
-#ifdef __KERNEL__
-
#include <asm-generic/bitops/ext2-non-atomic.h>
#define ext2_set_bit_atomic(lock, nr, addr) \
@@ -462,4 +451,9 @@ static inline int fls(int x)
#include <asm-generic/bitops/minix.h>
#endif /* __KERNEL__ */
+
+#undef ADDR
+
+#include <asm-generic/bitops/fls64.h>
+
#endif /* _ASM_X86_BITOPS_H */
Similarly in ifdef __KERNEL__ in asm/e820.h and asm/signal.h
And similarly others ifdef block.
Thanks,
--
JSR
reply other threads:[~2009-07-13 7:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1247469312.2525.5.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.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