Hi Huang,

[auto build test WARNING on hwmon/hwmon-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:    
https://github.com/0day-ci/linux/commits/Huang-Rui/hwmon-fam15h_power-Introduce-an-accumulated-power-reporting-algorithm/20151030-181426
config: x86_64-randconfig-x012-10300134 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/cpumask.h:4:0,
                    from arch/x86/include/asm/msr.h:10,
                    from arch/x86/include/asm/processor.h:20,
                    from arch/x86/include/asm/atomic.h:6,
                    from include/linux/atomic.h:4,
                    from include/linux/debug_locks.h:5,
                    from include/linux/lockdep.h:23,
                    from include/linux/spinlock_types.h:18,
                    from include/linux/mutex.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:15,
                    from include/linux/kobject.h:21,
                    from include/linux/device.h:17,
                    from include/linux/hwmon-sysfs.h:23,
                    from drivers/hwmon/fam15h_power.c:23:
   drivers/hwmon/fam15h_power.c: In function 'fam15h_power_probe':
>> include/linux/cpumask.h:24:29: warning: 'res_mask' may be used uninitialized 
>> in this function [-Wmaybe-uninitialized]
    #define cpumask_bits(maskp) ((maskp)->bits)
                                ^
   drivers/hwmon/fam15h_power.c:145:32: note: 'res_mask' was declared here
     cpumask_var_t mask, tmp_mask, res_mask;
                                   ^

vim +/res_mask +24 include/linux/cpumask.h

^1da177e Linus Torvalds 2005-04-16   8   */
^1da177e Linus Torvalds 2005-04-16   9  #include <linux/kernel.h>
^1da177e Linus Torvalds 2005-04-16  10  #include <linux/threads.h>
^1da177e Linus Torvalds 2005-04-16  11  #include <linux/bitmap.h>
187f1882 Paul Gortmaker 2011-11-23  12  #include <linux/bug.h>
^1da177e Linus Torvalds 2005-04-16  13  
cdfdef75 Rusty Russell  2015-03-05  14  /* Don't assign or return these: may 
not be this big! */
2d3854a3 Rusty Russell  2008-11-05  15  typedef struct cpumask { 
DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
^1da177e Linus Torvalds 2005-04-16  16  
ae7a47e7 Rusty Russell  2008-12-30  17  /**
6ba2ef7b Rusty Russell  2009-09-24  18   * cpumask_bits - get the bits in a 
cpumask
6ba2ef7b Rusty Russell  2009-09-24  19   * @maskp: the struct cpumask *
ae7a47e7 Rusty Russell  2008-12-30  20   *
6ba2ef7b Rusty Russell  2009-09-24  21   * You should only assume nr_cpu_ids 
bits of this mask are valid.  This is
6ba2ef7b Rusty Russell  2009-09-24  22   * a macro so it's const-correct.
ae7a47e7 Rusty Russell  2008-12-30  23   */
6ba2ef7b Rusty Russell  2009-09-24 @24  #define cpumask_bits(maskp) 
((maskp)->bits)
7ea931c9 Paul Jackson   2008-04-28  25  
f1bbc032 Tejun Heo      2015-02-13  26  /**
f1bbc032 Tejun Heo      2015-02-13  27   * cpumask_pr_args - printf args to 
output a cpumask
f1bbc032 Tejun Heo      2015-02-13  28   * @maskp: cpumask to be printed
f1bbc032 Tejun Heo      2015-02-13  29   *
f1bbc032 Tejun Heo      2015-02-13  30   * Can be used to provide arguments for 
'%*pb[l]' when printing a cpumask.
f1bbc032 Tejun Heo      2015-02-13  31   */
f1bbc032 Tejun Heo      2015-02-13  32  #define cpumask_pr_args(maskp)          
nr_cpu_ids, cpumask_bits(maskp)

:::::: The code at line 24 was first introduced by commit
:::::: 6ba2ef7baac23a5d9bb85e28b882d16b439a2293 cpumask: Move deprecated 
functions to end of header.

:::::: TO: Rusty Russell <[email protected]>
:::::: CC: Rusty Russell <[email protected]>

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

Attachment: .config.gz
Description: Binary data

Reply via email to