mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + lib-test-module-for-find__bit-functions-fix-2.patch added to -mm tree
@ 2017-11-14  1:06 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-11-14  1:06 UTC (permalink / raw)
  To: arnd, courbet, rdunlap, ynorov, mm-commits


The patch titled
     Subject: lib: use correct format string for find-bit tests
has been added to the -mm tree.  Its filename is
     lib-test-module-for-find__bit-functions-fix-2.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-test-module-for-find__bit-functions-fix-2.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-test-module-for-find__bit-functions-fix-2.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Arnd Bergmann <arnd@arndb.de>
Subject: lib: use correct format string for find-bit tests

The cycles_t definition is architecture specific, which causes a link
error on all architectures that use a 'long long' or 'int' type for it:

lib/test_find_bit.c: In function 'test_find_last_bit':
include/linux/kern_levels.h:5:18: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'cycles_t {aka long long unsigned int}' [-Werror=format=]

This adds an explicit cast to 'u64' for it, which lets us use
'%llu' everywhere.

Link: http://lkml.kernel.org/r/20171113135605.3166307-1-arnd@arndb.de
Fixes: 09588b1f1d58 ("lib: test module for find_*_bit() functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Yury Norov <ynorov@caviumnetworks.com>
Cc: Clement Courbet <courbet@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/test_find_bit.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff -puN lib/test_find_bit.c~lib-test-module-for-find__bit-functions-fix-2 lib/test_find_bit.c
--- a/lib/test_find_bit.c~lib-test-module-for-find__bit-functions-fix-2
+++ a/lib/test_find_bit.c
@@ -51,7 +51,8 @@ static int __init test_find_first_bit(vo
 		__clear_bit(i, bitmap);
 	}
 	cycles = get_cycles() - cycles;
-	pr_err("find_first_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
+	pr_err("find_first_bit:\t\t%llu cycles,\t%ld iterations\n",
+	       (u64)cycles, cnt);
 
 	return 0;
 }
@@ -65,7 +66,8 @@ static int __init test_find_next_bit(con
 	for (cnt = i = 0; i < BITMAP_LEN; cnt++)
 		i = find_next_bit(bitmap, BITMAP_LEN, i) + 1;
 	cycles = get_cycles() - cycles;
-	pr_err("find_next_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
+	pr_err("find_next_bit:\t\t%llu cycles,\t%ld iterations\n",
+	       (u64)cycles, cnt);
 
 	return 0;
 }
@@ -79,8 +81,8 @@ static int __init test_find_next_zero_bi
 	for (cnt = i = 0; i < BITMAP_LEN; cnt++)
 		i = find_next_zero_bit(bitmap, len, i) + 1;
 	cycles = get_cycles() - cycles;
-	pr_err("find_next_zero_bit:\t%ld cycles,\t%ld iterations\n",
-								cycles, cnt);
+	pr_err("find_next_zero_bit:\t%llu cycles,\t%ld iterations\n",
+	       (u64)cycles, cnt);
 
 	return 0;
 }
@@ -99,7 +101,8 @@ static int __init test_find_last_bit(con
 		len = l;
 	} while (len);
 	cycles = get_cycles() - cycles;
-	pr_err("find_last_bit:\t\t%ld cycles,\t%ld iterations\n", cycles, cnt);
+	pr_err("find_last_bit:\t\t%llu cycles,\t%ld iterations\n",
+	       (u64)cycles, cnt);
 
 	return 0;
 }
_

Patches currently in -mm which might be from arnd@arndb.de are

iopoll-avoid-wint-in-bool-context-warning.patch
lib-test-module-for-find__bit-functions-fix-2.patch
initramfs-use-time64_t-timestamps.patch
pcmcia-badge4-avoid-unused-function-warning.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-14  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14  1:06 + lib-test-module-for-find__bit-functions-fix-2.patch added to -mm tree akpm

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