public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* unresoved symbol __ffs
@ 2004-07-02  2:46 Robert Lippmann
  2004-07-02  3:32 ` Nicolas Pitre
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Lippmann @ 2004-07-02  2:46 UTC (permalink / raw)
  To: linux-mtd

hi all,

haven't seen this covered before, but when i try to use recent snapshots
(late june-ish), i get this unresolved symbol when building a 2.4.26 kernel
using linux-mips.  i assume it's because the compiler
sets --disable-builtins when compiling.  it occurs in cfi_cmdset_0001.c
oddly, the file compiles without warnings.  oh, and i'm using gcc 3.3.2

i've tried #define __ffs ffs, but even that doesn't seem to work.

any ideas?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unresoved symbol __ffs
  2004-07-02  2:46 unresoved symbol __ffs Robert Lippmann
@ 2004-07-02  3:32 ` Nicolas Pitre
  2004-07-04 21:12   ` dkey
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2004-07-02  3:32 UTC (permalink / raw)
  To: Robert Lippmann; +Cc: linux-mtd

On Thu, 1 Jul 2004, Robert Lippmann wrote:

> hi all,
> 
> haven't seen this covered before, but when i try to use recent snapshots
> (late june-ish), i get this unresolved symbol when building a 2.4.26 kernel
> using linux-mips.  i assume it's because the compiler
> sets --disable-builtins when compiling.  it occurs in cfi_cmdset_0001.c
> oddly, the file compiles without warnings.  oh, and i'm using gcc 3.3.2

__ffs should be defined in linux/asm/bitops.h.  It is defined for MIPS as 
follows in 2.6.7:

/*
 * __ffs - find first bit in word.
 * @word: The word to search
 *
 * Undefined if no bit exists, so code should check against 0 first.
 */
static inline unsigned long __ffs(unsigned long word)
{
        return ffz(~word);
}

> i've tried #define __ffs ffs, but even that doesn't seem to work.

It's qite odd that it didn't compile, bit even if it did __ffs and ffs 
aren't equivalent.


Nicolas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unresoved symbol __ffs
  2004-07-02  3:32 ` Nicolas Pitre
@ 2004-07-04 21:12   ` dkey
  2004-07-06  1:09     ` Nicolas Pitre
  0 siblings, 1 reply; 4+ messages in thread
From: dkey @ 2004-07-04 21:12 UTC (permalink / raw)
  To: linux-mtd; +Cc: Robert Lippmann, Nicolas Pitre

On Friday 02 July 2004 05:32, Nicolas Pitre wrote:
> On Thu, 1 Jul 2004, Robert Lippmann wrote:
> > hi all,
> >
> > haven't seen this covered before, but when i try to use recent snapshots
> > (late june-ish), i get this unresolved symbol when building a 2.4.26
> > kernel using linux-mips.  i assume it's because the compiler
> > sets --disable-builtins when compiling.  it occurs in cfi_cmdset_0001.c
> > oddly, the file compiles without warnings.  oh, and i'm using gcc 3.3.2
>
> __ffs should be defined in linux/asm/bitops.h.  It is defined for MIPS as
> follows in 2.6.7:
>

but in 2.4.x kernels, it is defined as ffs (without leading underscores), so 
maybe the code should be adapted to fit 2.6 and 2.4 kernels.

greets dkey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unresoved symbol __ffs
  2004-07-04 21:12   ` dkey
@ 2004-07-06  1:09     ` Nicolas Pitre
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Pitre @ 2004-07-06  1:09 UTC (permalink / raw)
  To: dkey; +Cc: Robert Lippmann, linux-mtd

On Sun, 4 Jul 2004, dkey wrote:

> On Friday 02 July 2004 05:32, Nicolas Pitre wrote:
> > On Thu, 1 Jul 2004, Robert Lippmann wrote:
> > > hi all,
> > >
> > > haven't seen this covered before, but when i try to use recent snapshots
> > > (late june-ish), i get this unresolved symbol when building a 2.4.26
> > > kernel using linux-mips.  i assume it's because the compiler
> > > sets --disable-builtins when compiling.  it occurs in cfi_cmdset_0001.c
> > > oddly, the file compiles without warnings.  oh, and i'm using gcc 3.3.2
> >
> > __ffs should be defined in linux/asm/bitops.h.  It is defined for MIPS as
> > follows in 2.6.7:
> >
> 
> but in 2.4.x kernels, it is defined as ffs (without leading underscores), so 

Did you read my previous mail?

	ffs() != __ffs()


Nicolas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-06 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-02  2:46 unresoved symbol __ffs Robert Lippmann
2004-07-02  3:32 ` Nicolas Pitre
2004-07-04 21:12   ` dkey
2004-07-06  1:09     ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox