CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Vincent Donnefort <[email protected]>
CC: "Rafael J. Wysocki" <[email protected]>
CC: Lukasz Luba <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   8006b911c90a4ec09958447d24c8a4c3538f5723
commit: 8354eb9eb3ddb4a8d0857648a470beffcc9d8639 [5618/7806] PM: EM: Allow 
skipping inefficient states
:::::: branch date: 2 days ago
:::::: commit date: 10 days ago
config: x86_64-randconfig-m031-20211013 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
include/linux/energy_model.h:155 em_pd_get_efficient_state() error: 
uninitialized symbol 'ps'.

vim +/ps +155 include/linux/energy_model.h

27871f7a8a341e Quentin Perret    2018-12-03  126  
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  127  /**
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  128   * 
em_pd_get_efficient_state() - Get an efficient performance state from the EM
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  129   * @pd   : Performance domain 
for which we want an efficient frequency
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  130   * @freq : Frequency to map 
with the EM
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  131   *
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  132   * It is called from the 
scheduler code quite frequently and as a consequence
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  133   * doesn't implement any 
check.
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  134   *
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  135   * Return: An efficient 
performance state, high enough to meet @freq
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  136   * requirement.
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  137   */
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  138  static inline
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  139  struct em_perf_state 
*em_pd_get_efficient_state(struct em_perf_domain *pd,
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  140                                
                unsigned long freq)
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  141  {
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  142        struct em_perf_state 
*ps;
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  143        int i;
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  144  
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  145        for (i = 0; i < 
pd->nr_perf_states; i++) {
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  146                ps = 
&pd->table[i];
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  147                if 
(ps->frequency >= freq) {
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  148                        if 
(pd->flags & EM_PERF_DOMAIN_SKIP_INEFFICIENCIES &&
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  149                            
ps->flags & EM_PERF_STATE_INEFFICIENT)
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  150                                
continue;
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  151                        break;
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  152                }
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  153        }
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  154  
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08 @155        return ps;
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  156  }
8354eb9eb3ddb4 Vincent Donnefort 2021-09-08  157  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to