From: Chen Gang <gang.chen@asianux.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-m68k <linux-m68k@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] arch/*/asm/include/bitops.h: api issue, find_*_bit() defination are different with each other
Date: Wed, 05 Jun 2013 19:34:50 +0800 [thread overview]
Message-ID: <51AF225A.5020703@asianux.com> (raw)
In-Reply-To: <20130605071915.GK23140@pengutronix.de>
On 06/05/2013 03:19 PM, Uwe � wrote:
> Hello,
>
> On Wed, Jun 05, 2013 at 09:13:01AM +0800, Chen Gang wrote:
>>
>> For arm and m68k, they customize find_*_bit(), but the API is different
>> with 'generic'.
>>
>> avr32, s390, and unicore32 also customize find_*_bit(), but the API is
>> the same with 'generic', and the left architectures all use 'generic'.
>>
>> So need change arm and m68k related API to match the 'generic', then
>> all another modules can face same public API for various architectures.
>>
>> Also beautify code and comments to pass "./scripts/checkpatch.pl"
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>> arch/arm/include/asm/bitops.h | 26 ++++++++++++++++++--------
>> arch/arm/lib/findbit.S | 14 ++++++++++----
>> arch/m68k/include/asm/bitops.h | 25 ++++++++++++++-----------
>> 3 files changed, 42 insertions(+), 23 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
>> index e691ec9..10566c8 100644
>> --- a/arch/arm/include/asm/bitops.h
>> +++ b/arch/arm/include/asm/bitops.h
>> @@ -161,18 +161,28 @@ extern int _test_and_change_bit(int nr, volatile unsigned long * p);
>> /*
>> * Little endian assembly bitops. nr = 0 -> byte 0 bit 0.
>> */
>> -extern int _find_first_zero_bit_le(const void * p, unsigned size);
>> -extern int _find_next_zero_bit_le(const void * p, int size, int offset);
>> -extern int _find_first_bit_le(const unsigned long *p, unsigned size);
>> -extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
>> +extern unsigned long _find_first_zero_bit_le(const void *p,
> doesn't checkpatch critizise the double space in the line above?
>
Thank you very much for your carefully checking (could you tell me how
do you find it ?) :-)
I need wait for a day at least, if no another suggestions or
completions, I should send patch v3.
>> + unsigned long size);
>> +extern unsigned long _find_next_zero_bit_le(const void *p, unsigned long size,
>> + unsigned long offset);
>> +extern unsigned long _find_first_bit_le(const unsigned long *p,
>> + unsigned long size);
>> +extern unsigned long _find_next_bit_le(const unsigned long *p,
>> + unsigned long size,
>> + unsigned long offset);
>>
>> /*
>> * Big endian assembly bitops. nr = 0 -> byte 3 bit 0.
>> */
>> -extern int _find_first_zero_bit_be(const void * p, unsigned size);
>> -extern int _find_next_zero_bit_be(const void * p, int size, int offset);
>> -extern int _find_first_bit_be(const unsigned long *p, unsigned size);
>> -extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
>> +extern unsigned long _find_first_zero_bit_be(const void *p,
>> + unsigned long size);
>> +extern unsigned long _find_next_zero_bit_be(const void *p, unsigned long size,
>> + unsigned long offset);
>> +extern unsigned long _find_first_bit_be(const unsigned long *p,
>> + unsigned long size);
>> +extern unsigned long _find_next_bit_be(const unsigned long *p,
>> + unsigned long size,
>> + unsigned long offset);
>>
>> #ifndef CONFIG_SMP
>> /*
>> diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S
>> index 64f6bc1..9e3263a 100644
>> --- a/arch/arm/lib/findbit.S
>> +++ b/arch/arm/lib/findbit.S
>> @@ -19,7 +19,8 @@
>>
>> /*
>> * Purpose : Find a 'zero' bit
>> - * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit);
>> + * Prototype: unsigned long find_first_zero_bit(const void *p,
> here is another one.
>
Thanks.
--
Chen Gang
Asianux Corporation
next prev parent reply other threads:[~2013-06-05 11:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 1:10 [PATCH] arch/*/asm/include/bitops.h: api issue, find_*_bit() defination are different with each other Chen Gang
2013-06-05 1:11 ` Chen Gang
2013-06-05 1:13 ` [PATCH v2] " Chen Gang
2013-06-05 7:19 ` Uwe Kleine-König
2013-06-05 11:34 ` Chen Gang [this message]
2013-06-05 13:02 ` Uwe Kleine-König
2013-06-06 8:38 ` Chen Gang
2013-06-06 9:37 ` [PATCH v3] " Chen Gang
2013-06-18 3:33 ` Chen Gang
2013-07-05 1:09 ` Chen Gang
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=51AF225A.5020703@asianux.com \
--to=gang.chen@asianux.com \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=u.kleine-koenig@pengutronix.de \
/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).