public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k•org>
To: Akinobu Mita <akinobu.mita@gmail•com>
Cc: Jan Kara <jack@suse•cz>,
	linux-kernel@vger•kernel.org,
	Linux-Next <linux-next@vger•kernel.org>,
	linux-m68k <linux-m68k@lists•linux-m68k.org>
Subject: Re: [PATCH] udf: use ext2_find_next_bit
Date: Sun, 28 Feb 2010 15:07:17 +0100	[thread overview]
Message-ID: <10f740e81002280607p2ec5ec7eya6d6c2cc694b4733@mail.gmail.com> (raw)
In-Reply-To: <10f740e81002280204q2849317bj3e7d22c5c0c93333@mail.gmail.com>

On Sun, Feb 28, 2010 at 11:04, Geert Uytterhoeven <geert@linux-m68k•org> wrote:
> On Thu, Feb 25, 2010 at 15:29, Akinobu Mita <akinobu.mita@gmail•com> wrote:
>> 2010/2/25 Geert Uytterhoeven <geert@linux-m68k•org>:
>>> On Thu, Feb 25, 2010 at 02:38, Akinobu Mita <akinobu.mita@gmail•com> wrote:
>>>> 2010/2/25 Jan Kara <jack@suse•cz>:
>>>>> On Tue 23-02-10 23:11:13, Akinobu Mita wrote:
>>>>>> Use ext2_find_next_bit (generic_find_next_le_bit) to find the set bit
>>>>>> in little endian bitmap region.
>>>
>>> Is any of this in linux-next now?
>>>
>>> http://kisskb.ellerman.id.au/kisskb/buildresult/2208481/
>>> | fs/udf/balloc.c:274: error: implicit declaration of function
>>> 'generic_find_next_le_bit'
>>
>> Yep, Jan's patch caused the build breakage.
>>
>> Because generic_find_next_le_bit() is not available for all
>> archtectures. So we should use ext2_find_next_bit() here.
>
> Most architectures use the definitions in asm-generic, so they're OK.
> M68k doesn't. S390 is also affected, and I think arm as well (but there's no
> arm all-modconfig build in linux-next, so I'm not 100% sure).
>
> I'm cooking a patch...

>From c9b5c7e6ef2092be822778a0b6b3d3032c058f5b Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k•org>
Date: Sun, 28 Feb 2010 13:06:27 +0100
Subject: [PATCH] m68k: Implement generic_find_next_{zero_,}le_bit()

linux-next:
fs/udf/balloc.c: In function 'udf_bitmap_new_block':
fs/udf/balloc.c:274: error: implicit declaration of function
'generic_find_next_le_bit'

Convert ext2_find_next_{zero_,}bit() into generic_find_next_{zero_,}le_bit(),
and wrap the ext2_find_next_{zero_,}bit() around the latter.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k•org>
---
 arch/m68k/include/asm/bitops_mm.h |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/m68k/include/asm/bitops_mm.h
b/arch/m68k/include/asm/bitops_mm.h
index 9bde784..b4ecdaa 100644
--- a/arch/m68k/include/asm/bitops_mm.h
+++ b/arch/m68k/include/asm/bitops_mm.h
@@ -365,6 +365,10 @@ static inline int minix_test_bit(int nr, const void *vaddr)
 #define ext2_set_bit_atomic(lock, nr, addr)	test_and_set_bit((nr) ^
24, (unsigned long *)(addr))
 #define ext2_clear_bit(nr, addr)		__test_and_clear_bit((nr) ^ 24,
(unsigned long *)(addr))
 #define ext2_clear_bit_atomic(lock, nr, addr)	test_and_clear_bit((nr)
^ 24, (unsigned long *)(addr))
+#define ext2_find_next_zero_bit(addr, size, offset) \
+	generic_find_next_zero_le_bit((unsigned long *)addr, size, offset)
+#define ext2_find_next_bit(addr, size, offset) \
+	generic_find_next_le_bit((unsigned long *)addr, size, offset)

 static inline int ext2_test_bit(int nr, const void *vaddr)
 {
@@ -394,10 +398,9 @@ static inline int ext2_find_first_zero_bit(const
void *vaddr, unsigned size)
 	return (p - addr) * 32 + res;
 }

-static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size,
-					  unsigned offset)
+static inline unsigned long generic_find_next_zero_le_bit(const
unsigned long *addr,
+		unsigned long size, unsigned long offset)
 {
-	const unsigned long *addr = vaddr;
 	const unsigned long *p = addr + (offset >> 5);
 	int bit = offset & 31UL, res;

@@ -437,10 +440,9 @@ static inline int ext2_find_first_bit(const void
*vaddr, unsigned size)
 	return (p - addr) * 32 + res;
 }

-static inline int ext2_find_next_bit(const void *vaddr, unsigned size,
-				     unsigned offset)
+static inline unsigned long generic_find_next_le_bit(const unsigned long *addr,
+		unsigned long size, unsigned long offset)
 {
-	const unsigned long *addr = vaddr;
 	const unsigned long *p = addr + (offset >> 5);
 	int bit = offset & 31UL, res;

-- 
1.6.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k•org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

  reply	other threads:[~2010-02-28 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1266934273-9371-1-git-send-email-akinobu.mita@gmail.com>
     [not found] ` <20100224162152.GK3687@quack.suse.cz>
     [not found]   ` <961aa3351002241738r7bbdc811p1fe80aabc336ae85@mail.gmail.com>
2010-02-25  8:50     ` [PATCH] udf: use ext2_find_next_bit Geert Uytterhoeven
2010-02-25 14:29       ` Akinobu Mita
2010-02-28 10:04         ` Geert Uytterhoeven
2010-02-28 14:07           ` Geert Uytterhoeven [this message]
2010-03-01 10:54             ` Jan Kara

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=10f740e81002280607p2ec5ec7eya6d6c2cc694b4733@mail.gmail.com \
    --to=geert@linux-m68k$(echo .)org \
    --cc=akinobu.mita@gmail$(echo .)com \
    --cc=jack@suse$(echo .)cz \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-m68k@lists$(echo .)linux-m68k.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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