All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 3/4] PM / devfreq: Add cpu based scaling support to passive governor
Date: Thu, 24 Jun 2021 04:50:32 +0800	[thread overview]
Message-ID: <202106240411.k88nFzEU-lkp@intel.com> (raw)
In-Reply-To: <20210617060546.26933-4-cw00.choi@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 15773 bytes --]

Hi Chanwoo,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210623]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chanwoo-Choi/PM-devfreq-passive-Fix-get_target_freq-when-not-using-required-opp/20210617-150556
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 70585216fe7730d9fb5453d3e2804e149d0fe201
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/53908c80cda313fc07cffa4f47611bda4fe7637c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chanwoo-Choi/PM-devfreq-passive-Fix-get_target_freq-when-not-using-required-opp/20210617-150556
        git checkout 53908c80cda313fc07cffa4f47611bda4fe7637c
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_simpleondemand.c:10:
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
     331 |  struct devfreq_cpu_data *cpu_data[NR_CPUS];
         |                           ^~~~~~~~
   In file included from drivers/devfreq/governor_simpleondemand.c:11:
>> include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
     332 | };
         | ^
--
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_passive.c:10:
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
     331 |  struct devfreq_cpu_data *cpu_data[NR_CPUS];
         |                           ^~~~~~~~
   In file included from drivers/devfreq/governor_passive.c:16:
>> include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
     332 | };
         | ^
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_passive.c:10:
   drivers/devfreq/governor_passive.c: In function 'get_target_freq_with_cpufreq':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   drivers/devfreq/governor_passive.c:52:27: note: in expansion of macro 'cpu_data'
      52 |  struct devfreq_cpu_data *cpu_data;
         |                           ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:58:22: note: in expansion of macro 'cpu_data'
      58 |   cpu_data = p_data->cpu_data[cpu];
         |                      ^~~~~~~~
>> drivers/devfreq/governor_passive.c:59:7: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
      59 |   if (!cpu_data || cpu_data->first_cpu != cpu)
         |       ^
>> drivers/devfreq/governor_passive.c:59:28: error: 'struct cpuinfo_um' has no member named 'first_cpu'
      59 |   if (!cpu_data || cpu_data->first_cpu != cpu)
         |                            ^~
>> drivers/devfreq/governor_passive.c:63:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
      63 |   cpu_cur = cpu_data->cur_freq * HZ_PER_KHZ;
         |                     ^~
>> drivers/devfreq/governor_passive.c:64:49: error: 'struct cpuinfo_um' has no member named 'dev'
      64 |   freq = get_taget_freq_by_required_opp(cpu_data->dev,
         |                                                 ^~
>> drivers/devfreq/governor_passive.c:65:14: error: 'struct cpuinfo_um' has no member named 'opp_table'
      65 |      cpu_data->opp_table,
         |              ^~
>> drivers/devfreq/governor_passive.c:75:21: error: 'struct cpuinfo_um' has no member named 'min_freq'
      75 |   cpu_min = cpu_data->min_freq;
         |                     ^~
>> drivers/devfreq/governor_passive.c:76:21: error: 'struct cpuinfo_um' has no member named 'max_freq'
      76 |   cpu_max = cpu_data->max_freq;
         |                     ^~
   drivers/devfreq/governor_passive.c:77:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
      77 |   cpu_cur = cpu_data->cur_freq;
         |                     ^~
>> drivers/devfreq/governor_passive.c:50:31: warning: variable 'p_data' set but not used [-Wunused-but-set-variable]
      50 |  struct devfreq_passive_data *p_data =
         |                               ^~~~~~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_passive.c:10:
   drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_notifier_call':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   drivers/devfreq/governor_passive.c:215:27: note: in expansion of macro 'cpu_data'
     215 |  struct devfreq_cpu_data *cpu_data;
         |                           ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:221:10: note: in expansion of macro 'cpu_data'
     221 |   !data->cpu_data[freqs->policy->cpu])
         |          ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:224:19: note: in expansion of macro 'cpu_data'
     224 |  cpu_data = data->cpu_data[freqs->policy->cpu];
         |                   ^~~~~~~~
   drivers/devfreq/governor_passive.c:225:14: error: 'struct cpuinfo_um' has no member named 'cur_freq'
     225 |  if (cpu_data->cur_freq == freqs->new)
         |              ^~
   drivers/devfreq/governor_passive.c:228:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
     228 |  cur_freq = cpu_data->cur_freq;
         |                     ^~
   drivers/devfreq/governor_passive.c:229:10: error: 'struct cpuinfo_um' has no member named 'cur_freq'
     229 |  cpu_data->cur_freq = freqs->new;
         |          ^~
   drivers/devfreq/governor_passive.c:235:11: error: 'struct cpuinfo_um' has no member named 'cur_freq'
     235 |   cpu_data->cur_freq = cur_freq;
         |           ^~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_passive.c:10:
   drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_register_notifier':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   drivers/devfreq/governor_passive.c:249:27: note: in expansion of macro 'cpu_data'
     249 |  struct devfreq_cpu_data *cpu_data;
         |                           ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:266:15: note: in expansion of macro 'cpu_data'
     266 |   if (p_data->cpu_data[cpu])
         |               ^~~~~~~~
>> drivers/devfreq/governor_passive.c:271:13: error: lvalue required as left operand of assignment
     271 |    cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
         |             ^
   drivers/devfreq/governor_passive.c:272:8: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
     272 |    if (!cpu_data) {
         |        ^
   drivers/devfreq/governor_passive.c:290:12: error: 'struct cpuinfo_um' has no member named 'dev'
     290 |    cpu_data->dev = cpu_dev;
         |            ^~
   drivers/devfreq/governor_passive.c:291:12: error: 'struct cpuinfo_um' has no member named 'opp_table'
     291 |    cpu_data->opp_table = opp_table;
         |            ^~
   drivers/devfreq/governor_passive.c:292:12: error: 'struct cpuinfo_um' has no member named 'first_cpu'
     292 |    cpu_data->first_cpu = cpumask_first(policy->related_cpus);
         |            ^~
   drivers/devfreq/governor_passive.c:293:12: error: 'struct cpuinfo_um' has no member named 'cur_freq'
     293 |    cpu_data->cur_freq = policy->cur;
         |            ^~
   drivers/devfreq/governor_passive.c:294:12: error: 'struct cpuinfo_um' has no member named 'min_freq'
     294 |    cpu_data->min_freq = policy->cpuinfo.min_freq;
         |            ^~
   drivers/devfreq/governor_passive.c:295:12: error: 'struct cpuinfo_um' has no member named 'max_freq'
     295 |    cpu_data->max_freq = policy->cpuinfo.max_freq;
         |            ^~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:92,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/devfreq/governor_passive.c:10:
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:297:12: note: in expansion of macro 'cpu_data'
     297 |    p_data->cpu_data[cpu] = cpu_data;
         |            ^~~~~~~~
   drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_unregister_notifier':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
      97 | #define cpu_data (&boot_cpu_data)
         |                   ^
   drivers/devfreq/governor_passive.c:322:27: note: in expansion of macro 'cpu_data'
     322 |  struct devfreq_cpu_data *cpu_data;
         |                           ^~~~~~~~
   arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:329:22: note: in expansion of macro 'cpu_data'
     329 |   cpu_data = p_data->cpu_data[cpu];
         |                      ^~~~~~~~
   arch/um/include/asm/processor-generic.h:97:18: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
      97 | #define cpu_data (&boot_cpu_data)
         |                  ^
   drivers/devfreq/governor_passive.c:330:7: note: in expansion of macro 'cpu_data'
     330 |   if (cpu_data) {
         |       ^~~~~~~~
   drivers/devfreq/governor_passive.c:331:16: error: 'struct cpuinfo_um' has no member named 'opp_table'
     331 |    if (cpu_data->opp_table)
         |                ^~
   drivers/devfreq/governor_passive.c:332:38: error: 'struct cpuinfo_um' has no member named 'opp_table'
     332 |     dev_pm_opp_put_opp_table(cpu_data->opp_table);
         |                                      ^~
   drivers/devfreq/governor_passive.c:334:13: error: lvalue required as left operand of assignment
     334 |    cpu_data = NULL;
         |             ^


vim +59 drivers/devfreq/governor_passive.c

    46	
    47	static int get_target_freq_with_cpufreq(struct devfreq *devfreq,
    48						unsigned long *target_freq)
    49	{
  > 50		struct devfreq_passive_data *p_data =
    51					(struct devfreq_passive_data *)devfreq->data;
    52		struct devfreq_cpu_data *cpu_data;
    53		unsigned long cpu, cpu_cur, cpu_min, cpu_max, cpu_percent;
    54		unsigned long dev_min, dev_max;
    55		unsigned long freq = 0;
    56	
    57		for_each_online_cpu(cpu) {
    58			cpu_data = p_data->cpu_data[cpu];
  > 59			if (!cpu_data || cpu_data->first_cpu != cpu)
    60				continue;
    61	
    62			/* Get target freq via required opps */
  > 63			cpu_cur = cpu_data->cur_freq * HZ_PER_KHZ;
  > 64			freq = get_taget_freq_by_required_opp(cpu_data->dev,
  > 65						cpu_data->opp_table,
    66						devfreq->opp_table, cpu_cur);
    67			if (freq) {
    68				*target_freq = max(freq, *target_freq);
    69				continue;
    70			}
    71	
    72			/* Use Interpolation if required opps is not available */
    73			devfreq_get_freq_range(devfreq, &dev_min, &dev_max);
    74	
  > 75			cpu_min = cpu_data->min_freq;
  > 76			cpu_max = cpu_data->max_freq;
    77			cpu_cur = cpu_data->cur_freq;
    78	
    79			cpu_percent = ((cpu_cur - cpu_min) * 100) / (cpu_max - cpu_min);
    80			freq = dev_min + mult_frac(dev_max - dev_min, cpu_percent, 100);
    81	
    82			*target_freq = max(freq, *target_freq);
    83		}
    84	
    85		return 0;
    86	}
    87	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24520 bytes --]

  parent reply	other threads:[~2021-06-23 20:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210617054647epcas1p3f1ef3ddef736496151ff77df4f50749a@epcas1p3.samsung.com>
2021-06-17  6:05 ` [PATCH 0/4] PM / devfreq: Add cpu based scaling support to passive governor Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p4d2e5b1fa1ec35487701189808178da18@epcas1p4.samsung.com>
2021-06-17  6:05     ` [PATCH 1/4] PM / devfreq: passive: Fix get_target_freq when not using required-opp Chanwoo Choi
2021-06-24  1:38       ` Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p265359058d489661e09d8d48d4937ca7b@epcas1p2.samsung.com>
2021-06-17  6:05     ` [PATCH 2/4] PM / devfreq: Export devfreq_get_freq_ragne symbol within devfreq Chanwoo Choi
2021-06-22 18:23       ` Matthias Kaehlcke
2021-07-13 19:36         ` Chanwoo Choi
     [not found]   ` <CGME20210617054647epcas1p431edaffea5bf7f3792b55dc3d91289ae@epcas1p4.samsung.com>
2021-06-17  6:05     ` [PATCH 3/4] PM / devfreq: Add cpu based scaling support to passive governor Chanwoo Choi
2021-06-17  5:51       ` Hsin-Yi Wang
2021-06-17  6:13         ` Chanwoo Choi
2021-06-22 17:42       ` Matthias Kaehlcke
2021-06-22 18:36       ` Matthias Kaehlcke
2021-06-23 20:50       ` kernel test robot [this message]
     [not found]   ` <CGME20210617054647epcas1p41cd87f03bc6f5b44b6f2d7a3e5924860@epcas1p4.samsung.com>
2021-06-17  6:05     ` [PATCH 4/4] PM / devfreq: passive: Reduce duplicate code when passive_devfreq case Chanwoo Choi
2021-06-22 18:35       ` Matthias Kaehlcke
2021-07-13 19:31         ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202106240411.k88nFzEU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.