Merge tag 'printk-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk...
[platform/kernel/linux-starfive.git] / lib / test_printf.c
index 7d60f24..95a2f82 100644 (file)
 #define PAD_SIZE 16
 #define FILL_CHAR '$'
 
-static unsigned total_tests __initdata;
-static unsigned failed_tests __initdata;
+KSTM_MODULE_GLOBALS();
+
 static char *test_buffer __initdata;
 static char *alloced_buffer __initdata;
 
+extern bool no_hash_pointers;
+
 static int __printf(4, 0) __init
 do_test(int bufsize, const char *expect, int elen,
        const char *fmt, va_list ap)
@@ -301,6 +303,12 @@ plain(void)
 {
        int err;
 
+       if (no_hash_pointers) {
+               pr_warn("skipping plain 'p' tests");
+               skipped_tests += 2;
+               return;
+       }
+
        err = plain_hash();
        if (err) {
                pr_warn("plain 'p' does not appear to be hashed\n");