Skip to contentSkip to conversation

fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"

PATCH In review Vagrant Cascadian 2 participants 2 messages Oct 10, 2017 – Oct 17, 2017 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"

This makes gcc no longer expect an out-of-line version of the functions being present elsewhere.

This fixes a failure to build on several marvell targets with gcc-7 on Debian:

https://bugs.debian.org/877963

---

 fs/jffs2/mini_inflate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/jffs2/mini_inflate.c +4 -4
index 2f13412f98..7bfbdb6801 100644
@@ -16,7 +16,7 @@
 static unsigned char huffman_order[] = {16, 17, 18,  0,  8,  7,  9,  6, 10,  5,
 					11,  4, 12,  3, 13,  2, 14,  1, 15};
 
-inline void cramfs_memset(int *s, const int c, size n)
+static inline void cramfs_memset(int *s, const int c, size n)
 {
 	n--;
 	for (;n > 0; n--) s[n] = c;
@@ -65,8 +65,8 @@ static void init_stream(struct bitstream *stream, unsigned char *data,
 /* pull 'bits' bits out of the stream. The last bit pulled it returned as the
  * msb. (section 3.1.1)
  */
-inline unsigned long pull_bits(struct bitstream *stream,
-			       const unsigned int bits)
+static inline unsigned long pull_bits(struct bitstream *stream,
+				      const unsigned int bits)
 {
 	unsigned long ret;
 	int i;
@@ -85,7 +85,7 @@ inline unsigned long pull_bits(struct bitstream *stream,
 	return ret;
 }
 
-inline int pull_bit(struct bitstream *stream)
+static inline int pull_bit(struct bitstream *stream)
 {
 	int ret = ((*(stream->data) >> stream->bit) & 1);
 	if (stream->bit++ == 7) {
Signature · 1 line
2.11.0
#1 lore raw
Quoted 10 lines · Vagrant Cascadian

This makes gcc no longer expect an out-of-line version of the functions being present elsewhere.

This fixes a failure to build on several marvell targets with gcc-7 on Debian:

https://bugs.debian.org/877963

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171016/c381abbb/attachment.sig>