tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
rcu/next
head:   cfc71fb0749122b29a70646a9a9522003418e5dc
commit: 7cf53ca0469972c1b953b68eb6a42e5d4fe75ef4 [55/57] srcutorture: Print 
Tiny SRCU reader statistics
config: x86_64-randconfig-x009-201713 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 7cf53ca0469972c1b953b68eb6a42e5d4fe75ef4
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from kernel/rcu/rcutorture.c:26:
   kernel/rcu/rcutorture.c: In function 'srcu_torture_stats':
>> include/linux/kern_levels.h:4:18: warning: format '%ld' expects argument of 
>> type 'long int', but argument 5 has type 'int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:8:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:297:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
>> kernel/rcu/rcutorture.c:594:2: note: in expansion of macro 'pr_alert'
     pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%ld,%ld)\n",
     ^~~~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%ld' expects argument of 
type 'long int', but argument 6 has type 'int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:8:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:297:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
>> kernel/rcu/rcutorture.c:594:2: note: in expansion of macro 'pr_alert'
     pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%ld,%ld)\n",
     ^~~~~~~~
--
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from kernel//rcu/rcutorture.c:26:
   kernel//rcu/rcutorture.c: In function 'srcu_torture_stats':
>> include/linux/kern_levels.h:4:18: warning: format '%ld' expects argument of 
>> type 'long int', but argument 5 has type 'int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:8:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:297:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
   kernel//rcu/rcutorture.c:594:2: note: in expansion of macro 'pr_alert'
     pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%ld,%ld)\n",
     ^~~~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%ld' expects argument of 
type 'long int', but argument 6 has type 'int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:8:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:297:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
   kernel//rcu/rcutorture.c:594:2: note: in expansion of macro 'pr_alert'
     pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%ld,%ld)\n",
     ^~~~~~~~

vim +/pr_alert +594 kernel/rcu/rcutorture.c

   578                  /*
   579                   * Make sure that a lock is always counted if the 
corresponding
   580                   * unlock is counted.
   581                   */
   582                  smp_rmb();
   583  
   584                  l0 = counts->lock_count[!idx];
   585                  l1 = counts->lock_count[idx];
   586  
   587                  c0 = l0 - u0;
   588                  c1 = l1 - u1;
   589                  pr_cont(" %d(%ld,%ld)", cpu, c0, c1);
   590          }
   591          pr_cont("\n");
   592  #elif defined(CONFIG_TINY_SRCU)
   593          idx = READ_ONCE(srcu_ctlp->srcu_idx) & 0x1;
 > 594          pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%ld,%ld)\n",
   595                   torture_type, TORTURE_FLAG, idx,
   596                   READ_ONCE(srcu_ctlp->srcu_lock_nesting[!idx]),
   597                   READ_ONCE(srcu_ctlp->srcu_lock_nesting[idx]));
   598  #endif
   599  }
   600  
   601  static void srcu_torture_synchronize_expedited(void)
   602  {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to