Skip to contentSkip to conversation

linux-next: build warning after merge of the akpm-current tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Jun 20, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

In file included from include/linux/printk.h:257:0,

                 from include/linux/kernel.h:13,
                 from arch/x86/include/asm/percpu.h:44,
                 from arch/x86/include/asm/preempt.h:5,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from crypto/zlib.c:26:
crypto/zlib.c: In function 'zlib_compress_update':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:171:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
crypto/zlib.c: In function 'zlib_compress_final':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:201:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
crypto/zlib.c: In function 'zlib_decompress_update':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:286:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
crypto/zlib.c: In function 'zlib_decompress_final':
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^
include/linux/dynamic_debug.h:64:16: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uLong' [-Wformat=]

  static struct _ddebug  __aligned(8)   \
                ^

include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
crypto/zlib.c:334:2: note: in expansion of macro 'pr_debug'
pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
^

Introduced by commit 8d9dfa4b0125 ("initramfs: support initramfs that is more than 2G"). Grep is your friend :-(

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw
Quoted 7 lines · Stephen Rothwell

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Introduced by commit 8d9dfa4b0125 ("initramfs: support initramfs that is more than 2G"). Grep is your friend :-(

Please check if attached patch fix the problem.

Yinghai

crypto/zlib.c +4 -4
index 06b62e5..c9ee681 100644
@@ -168,7 +168,7 @@ static int zlib_compress_update(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -198,7 +198,7 @@ static int zlib_compress_final(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -283,7 +283,7 @@ static int zlib_decompress_update(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
@@ -331,7 +331,7 @@ static int zlib_decompress_final(struct crypto_pcomp *tfm,
 	}
 
 	ret = req->avail_out - stream->avail_out;
-	pr_debug("avail_in %u, avail_out %u (consumed %u, produced %u)\n",
+	pr_debug("avail_in %lu, avail_out %lu (consumed %lu, produced %u)\n",
 		 stream->avail_in, stream->avail_out,
 		 req->avail_in - stream->avail_in, ret);
 	req->next_in = stream->next_in;
fs/jffs2/compr_zlib.c +3 -3
index 0b9a1e4..11ea1ee 100644
@@ -94,11 +94,11 @@ static int jffs2_zlib_compress(unsigned char *data_in,
 
 	while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) {
 		def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE);
-		def_strm.avail_in = min((unsigned)(*sourcelen-def_strm.total_in), def_strm.avail_out);
-		jffs2_dbg(1, "calling deflate with avail_in %d, avail_out %d\n",
+		def_strm.avail_in = min((unsigned long)(*sourcelen-def_strm.total_in), def_strm.avail_out);
+		jffs2_dbg(1, "calling deflate with avail_in %ld, avail_out %ld\n",
 			  def_strm.avail_in, def_strm.avail_out);
 		ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH);
-		jffs2_dbg(1, "deflate returned with avail_in %d, avail_out %d, total_in %ld, total_out %ld\n",
+		jffs2_dbg(1, "deflate returned with avail_in %ld, avail_out %ld, total_in %ld, total_out %ld\n",
 			  def_strm.avail_in, def_strm.avail_out,
 			  def_strm.total_in, def_strm.total_out);
 		if (ret != Z_OK) {