mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Kevin Wangtao <kevin.wangtao@hisilicon.com>
Cc: kbuild-all@01.org, rjw@rjwysocki.net, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	gengyanping@hisilicon.com, sunzhaosheng@hisilicon.com,
	Kevin Wangtao <kevin.wangtao@hisilicon.com>
Subject: Re: [PATCH] cpufreq: reinitialize new policy min/max when writing scaling_(max|min)_freq
Date: Sun, 27 May 2018 14:15:02 +0800	[thread overview]
Message-ID: <201805271404.O1TQomIp%fengguang.wu@intel.com> (raw)
In-Reply-To: <1527144234-96396-1-git-send-email-kevin.wangtao@hisilicon.com>

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

Hi Kevin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.17-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kevin-Wangtao/cpufreq-reinitialize-new-policy-min-max-when-writing-scaling_-max-min-_freq/20180527-132510
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-x079-201821 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/cpufreq/cpufreq.c: In function 'store_scaling_min_freq':
>> drivers/cpufreq/cpufreq.c:700:12: error: invalid type argument of '->' (have 'struct cpufreq_policy')
     new_policy->min = policy->user_policy.min;   \
               ^
   drivers/cpufreq/cpufreq.c:715:1: note: in expansion of macro 'store_one'
    store_one(scaling_min_freq, min);
    ^~~~~~~~~
   drivers/cpufreq/cpufreq.c:701:12: error: invalid type argument of '->' (have 'struct cpufreq_policy')
     new_policy->max = policy->user_policy.max;   \
               ^
   drivers/cpufreq/cpufreq.c:715:1: note: in expansion of macro 'store_one'
    store_one(scaling_min_freq, min);
    ^~~~~~~~~
   drivers/cpufreq/cpufreq.c: In function 'store_scaling_max_freq':
>> drivers/cpufreq/cpufreq.c:700:12: error: invalid type argument of '->' (have 'struct cpufreq_policy')
     new_policy->min = policy->user_policy.min;   \
               ^
   drivers/cpufreq/cpufreq.c:716:1: note: in expansion of macro 'store_one'
    store_one(scaling_max_freq, max);
    ^~~~~~~~~
   drivers/cpufreq/cpufreq.c:701:12: error: invalid type argument of '->' (have 'struct cpufreq_policy')
     new_policy->max = policy->user_policy.max;   \
               ^
   drivers/cpufreq/cpufreq.c:716:1: note: in expansion of macro 'store_one'
    store_one(scaling_max_freq, max);
    ^~~~~~~~~

vim +700 drivers/cpufreq/cpufreq.c

   685	
   686	static int cpufreq_set_policy(struct cpufreq_policy *policy,
   687					struct cpufreq_policy *new_policy);
   688	
   689	/**
   690	 * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
   691	 */
   692	#define store_one(file_name, object)			\
   693	static ssize_t store_##file_name					\
   694	(struct cpufreq_policy *policy, const char *buf, size_t count)		\
   695	{									\
   696		int ret, temp;							\
   697		struct cpufreq_policy new_policy;				\
   698										\
   699		memcpy(&new_policy, policy, sizeof(*policy));			\
 > 700		new_policy->min = policy->user_policy.min;			\
   701		new_policy->max = policy->user_policy.max;			\
   702										\
   703		ret = sscanf(buf, "%u", &new_policy.object);			\
   704		if (ret != 1)							\
   705			return -EINVAL;						\
   706										\
   707		temp = new_policy.object;					\
   708		ret = cpufreq_set_policy(policy, &new_policy);		\
   709		if (!ret)							\
   710			policy->user_policy.object = temp;			\
   711										\
   712		return ret ? ret : count;					\
   713	}
   714	

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

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

      parent reply	other threads:[~2018-05-27  6:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24  6:43 Kevin Wangtao
2018-05-24  7:45 ` Rafael J. Wysocki
2018-05-25  2:54   ` Wangtao (Kevin, Kirin)
2018-05-29  8:45     ` Rafael J. Wysocki
2018-05-26  6:50   ` Wangtao (Kevin, Kirin)
2018-05-29  8:47     ` Rafael J. Wysocki
2018-05-26  7:16 ` [PATCH V2] " Kevin Wangtao
2018-05-29 10:26   ` Viresh Kumar
2018-05-30  8:03     ` Wangtao (Kevin, Kirin)
2018-05-30  7:56   ` [PATCH V3] " Kevin Wangtao
2018-05-30 11:10     ` Rafael J. Wysocki
2018-05-27  6:15 ` kbuild test robot [this message]

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=201805271404.O1TQomIp%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=gengyanping@hisilicon.com \
    --cc=kbuild-all@01.org \
    --cc=kevin.wangtao@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sunzhaosheng@hisilicon.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®