linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of Linus' tree
@ 2015-10-07 22:44 Stephen Rothwell
  2015-10-08  0:27 ` [GIT PULL] strscpy powerpc fix for 3.4 Chris Metcalf
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2015-10-07 22:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-next, linux-kernel, Chris Metcalf, linuxppc-dev

Hi Linus,

After merging Linus' tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

lib/string.c: In function 'strscpy':
lib/string.c:209:4: error: implicit declaration of function 'zero_bytemask' [-Werror=implicit-function-declaration]
    *(unsigned long *)(dest+res) = c & zero_bytemask(data);
    ^

Caused by commit

  30035e45753b ("string: provide strscpy()")

but only exposed by commit

  19c22f3a29fa ("word-at-a-time.h: fix some Kbuild files")

BIG_ENDIAN powerpc doesn't have a definition for this function ...

Isn't this why we have linux-next ... to find this stuff early?  :-(

Oh, well, I have applied the following (that just copies zero_bytemask
from asm-generic.  I have done no testing beyond compiling.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 8 Oct 2015 09:29:26 +1100
Subject: [PATCH] word-at-a-time.h: powerpc: implement define zero_bytemask

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/word-at-a-time.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h
index 5b3a903adae6..4f9b6b93c18f 100644
--- a/arch/powerpc/include/asm/word-at-a-time.h
+++ b/arch/powerpc/include/asm/word-at-a-time.h
@@ -40,6 +40,8 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct
 	return (val + c->high_bits) & ~rhs;
 }
 
+#define zero_bytemask(mask) (~1ul << __fls(mask))
+
 #else
 
 #ifdef CONFIG_64BIT
-- 
2.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

end of thread, other threads:[~2015-10-10  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 22:44 linux-next: build failure after merge of Linus' tree Stephen Rothwell
2015-10-08  0:27 ` [GIT PULL] strscpy powerpc fix for 3.4 Chris Metcalf
2015-10-08 18:45   ` Guenter Roeck
2015-10-08 19:47     ` [GIT PULL] strscpy powerpc fix for 4.3 - not 3.4 :-) Chris Metcalf
2015-10-10  0:39   ` [GIT PULL] strscpy powerpc fix for 3.4 Stephen Rothwell

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).