From: Anton Blanchard <anton@samba.org>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
paulmck@linux.vnet.ibm.com, Emilian.Medve@Freescale.com
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 5/5] powerpc: make __ffs return unsigned long
Date: Tue, 5 Aug 2014 16:37:06 +1000 [thread overview]
Message-ID: <20140805163706.688d7b84@kryten> (raw)
In-Reply-To: <20140805163218.47c86615@kryten>
I'm seeing a build warning in mm/nobootmem.c after removing
bootmem:
mm/nobootmem.c: In function '__free_pages_memory':
include/linux/kernel.h:713:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
(void) (&_min1 == &_min2); \
^
mm/nobootmem.c:90:11: note: in expansion of macro 'min'
order = min(MAX_ORDER - 1UL, __ffs(start));
^
The rest of the worlds seems to define __ffs as returning unsigned long,
so lets do that.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: b/arch/powerpc/include/asm/bitops.h
===================================================================
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -213,7 +213,7 @@ static __inline__ unsigned long ffz(unsi
return __ilog2(x & -x);
}
-static __inline__ int __ffs(unsigned long x)
+static __inline__ unsigned long __ffs(unsigned long x)
{
return __ilog2(x & -x);
}
Index: b/arch/powerpc/sysdev/fsl_pci.c
===================================================================
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -152,7 +152,7 @@ static int setup_one_atmu(struct ccsr_pc
flags |= 0x10000000; /* enable relaxed ordering */
for (i = 0; size > 0; i++) {
- unsigned int bits = min(ilog2(size),
+ unsigned int bits = min_t(u32, ilog2(size),
__ffs(pci_addr | phys_addr));
if (index + i >= 5)
next prev parent reply other threads:[~2014-08-05 6:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 6:32 [PATCH 1/5] powerpc: Remove bootmem allocator Anton Blanchard
2014-08-05 6:33 ` [PATCH 2/5] powerpc: Remove some old bootmem related comments Anton Blanchard
2014-08-05 6:34 ` [PATCH 3/5] powerpc: Remove superfluous bootmem includes Anton Blanchard
2014-08-05 6:35 ` [PATCH 4/5] powerpc: Move sparse_init() into initmem_init Anton Blanchard
2014-08-05 6:37 ` Anton Blanchard [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-17 5:58 [PATCH 1/5] powerpc: Remove bootmem allocator Anton Blanchard
2014-09-17 5:58 ` [PATCH 5/5] powerpc: make __ffs return unsigned long Anton Blanchard
2014-09-17 12:15 [PATCH 1/5] powerpc: Remove bootmem allocator Anton Blanchard
2014-09-17 12:15 ` [PATCH 5/5] powerpc: make __ffs return unsigned long Anton Blanchard
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=20140805163706.688d7b84@kryten \
--to=anton@samba.org \
--cc=Emilian.Medve@Freescale.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
/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).