From: Mike Rapoport <rppt@linux.vnet.ibm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@linux-m68k.org>, Sam Creasey <sammy@sammy.net>
Cc: Michal Hocko <mhocko@kernel.org>,
linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Mike Rapoport <rppt@linux.vnet.ibm.com>
Subject: [PATCH v2 1/3] m68k/bitops: convert __ffs to match generic declaration
Date: Wed, 4 Jul 2018 09:28:14 +0300 [thread overview]
Message-ID: <1530685696-14672-2-git-send-email-rppt@linux.vnet.ibm.com> (raw)
In-Reply-To: <1530685696-14672-1-git-send-email-rppt@linux.vnet.ibm.com>
The generic bitops declare __ffs as
static inline unsigned long __ffs(unsigned long word);
Convert the m68k version to match the generic declaration.
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
arch/m68k/include/asm/bitops.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h
index 93b47b1..54009ea 100644
--- a/arch/m68k/include/asm/bitops.h
+++ b/arch/m68k/include/asm/bitops.h
@@ -454,7 +454,7 @@ static inline unsigned long ffz(unsigned long word)
*/
#if (defined(__mcfisaaplus__) || defined(__mcfisac__)) && \
!defined(CONFIG_M68000) && !defined(CONFIG_MCPU32)
-static inline int __ffs(int x)
+static inline unsigned long __ffs(unsigned long x)
{
__asm__ __volatile__ ("bitrev %0; ff1 %0"
: "=d" (x)
@@ -493,7 +493,11 @@ static inline int ffs(int x)
: "dm" (x & -x));
return 32 - cnt;
}
-#define __ffs(x) (ffs(x) - 1)
+
+static inline unsigned long __ffs(unsigned long x)
+{
+ return ffs(x) - 1;
+}
/*
* fls: find last bit set.
--
2.7.4
next prev parent reply other threads:[~2018-07-04 6:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 6:28 [PATCH v2 0/3] m68k: switch to MEMBLOCK + NO_BOOTMEM Mike Rapoport
2018-07-04 6:28 ` Mike Rapoport [this message]
2018-07-04 6:28 ` [PATCH v2 2/3] m68k/page_no.h: force __va argument to be unsigned long Mike Rapoport
2018-07-04 6:28 ` [PATCH v2 3/3] m68k: switch to MEMBLOCK + NO_BOOTMEM Mike Rapoport
2018-07-04 7:44 ` Geert Uytterhoeven
2018-07-04 7:54 ` Michal Hocko
2018-07-04 8:21 ` Geert Uytterhoeven
2018-07-04 12:22 ` Vlastimil Babka
2018-07-04 12:36 ` Michal Hocko
2018-07-04 12:36 ` Michal Hocko
2018-07-04 12:43 ` Mike Rapoport
2018-07-04 12:51 ` Michal Hocko
2018-07-04 12:57 ` Mike Rapoport
2018-07-04 13:05 ` Geert Uytterhoeven
2018-07-04 13:14 ` Michal Hocko
2018-07-06 6:17 ` Michal Hocko
2018-07-06 6:17 ` Michal Hocko
2018-07-05 12:13 ` [PATCH v2 0/3] " Greg Ungerer
2018-07-18 11:39 ` Geert Uytterhoeven
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=1530685696-14672-2-git-send-email-rppt@linux.vnet.ibm.com \
--to=rppt@linux.vnet.ibm.com \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=sammy@sammy.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.