From: Arnd Bergmann <arnd@arndb.de>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
linux-arch@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux390@de.ibm.com, linux-s390@vger.kernel.org,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] bitops: add ifdef CONFIG_GENERIC_FIND_BIT_LE guard
Date: Wed, 20 Apr 2011 16:31:39 +0200 [thread overview]
Message-ID: <201104201631.40017.arnd@arndb.de> (raw)
In-Reply-To: <1303309252-9946-1-git-send-email-akinobu.mita@gmail.com>
On Wednesday 20 April 2011, Akinobu Mita wrote:
> index 946a21b..bd2253e 100644
> --- a/include/asm-generic/bitops/le.h
> +++ b/include/asm-generic/bitops/le.h
> @@ -30,6 +30,8 @@ static inline unsigned long find_first_zero_bit_le(const void *addr,
>
> #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
>
> +#ifdef CONFIG_GENERIC_FIND_BIT_LE
> +
> extern unsigned long find_next_zero_bit_le(const void *addr,
> unsigned long size, unsigned long offset);
> extern unsigned long find_next_bit_le(const void *addr,
> @@ -38,6 +40,8 @@ extern unsigned long find_next_bit_le(const void *addr,
> #define find_first_zero_bit_le(addr, size) \
> find_next_zero_bit_le((addr), (size), 0)
>
> +#endif /* CONFIG_GENERIC_FIND_BIT_LE */
> +
> #else
> #error "Please fix <asm/byteorder.h>"
> #endif
The style that we normally use in asm-generic is to test the macro itself
for existence, so in asm-generic, do:
#ifndef find_next_zero_bit_le
extern unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset);
#endif
and in the architectures, write
static inline unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
#define find_next_zero_bit_le find_next_zero_bit_le
I guess we can do the #ifdef separately for each of the three macros,
or choose one of them to use as a key.
Arnd
next prev parent reply other threads:[~2011-04-20 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 14:20 [PATCH 1/3] bitops: add ifdef CONFIG_GENERIC_FIND_BIT_LE guard Akinobu Mita
2011-04-20 14:20 ` [PATCH 2/3] arm: use asm-generic/bitops/le.h Akinobu Mita
2011-04-20 14:20 ` [PATCH 3/3] s390: " Akinobu Mita
2011-04-20 14:31 ` Arnd Bergmann [this message]
2011-04-20 22:59 ` [PATCH 1/3] bitops: add ifdef CONFIG_GENERIC_FIND_BIT_LE guard Akinobu Mita
2011-04-21 9:03 ` Arnd Bergmann
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=201104201631.40017.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=linux@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox