Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: Ralf Baechle <ralf@oss.sgi.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: gcc 3.x, -ansi and "static inline"
Date: Mon, 04 Feb 2002 11:28:16 -0800	[thread overview]
Message-ID: <3C5EE0D0.F2CC94CE@mvista.com> (raw)
In-Reply-To: 20020203180151.A5371@dea.linux-mips.net

Ralf Baechle wrote:
> 
> On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote:
> 
> > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary
> > and caused a bunch of similar errors.
> 
> Indeed, it was pointless and I therefore removed it.
> 

What about ffz()?  We can do:

diff -Nru include/asm-mips/bitops.h.orig include/asm-mips/bitops.h
--- include/asm-mips/bitops.h.orig      Mon Feb  4 11:07:31 2002
+++ include/asm-mips/bitops.h   Mon Feb  4 11:21:14 2002
@@ -675,7 +675,7 @@
  *
  * Undefined if no zero exists, so code should check against ~0UL first.
  */
-static inline unsigned long ffz(unsigned long word)
+static __inline__ unsigned long ffz(unsigned long word)
 {
        int b = 0, s;
 

or 

diff -Nru include/asm-mips/bitops.h.orig include/asm-mips/bitops.h
--- include/asm-mips/bitops.h.orig      Mon Feb  4 11:07:31 2002
+++ include/asm-mips/bitops.h   Mon Feb  4 11:27:55 2002
@@ -669,6 +669,8 @@
 
 #endif /* !(__MIPSEB__) */
 
+#ifdef __KERNEL__
+
 /*
  * ffz - find first zero in word.
  * @word: The word to search
@@ -689,8 +691,6 @@
        return b;
 }
 
-
-#ifdef __KERNEL__
 
 /**
  * ffs - find first bit set


Jun

  reply	other threads:[~2002-02-04 20:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 19:52 gcc 3.x, -ansi and "static inline" Jun Sun
2002-02-02  9:17 ` Geert Uytterhoeven
2002-02-03 17:01 ` Ralf Baechle
2002-02-04 19:28   ` Jun Sun [this message]
2002-02-04 22:21     ` Ralf Baechle
2002-02-04 22:56       ` Jun Sun
2002-02-04 23:01         ` Ralf Baechle

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=3C5EE0D0.F2CC94CE@mvista.com \
    --to=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=ralf@oss.sgi.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