linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	James Smart <james.smart@broadcom.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>
Subject: Re: [PATCH -next] cpufreq: add stub for get_cpu_idle_time() to fix scsi/lpfc driver build
Date: Tue, 7 Jul 2020 08:39:43 +0530	[thread overview]
Message-ID: <20200707030943.xkocccy6qy2c3hrx@vireshk-i7> (raw)
In-Reply-To: <3a20bf20-247d-1242-dcd0-aef1bbc6e308@infradead.org>

On 06-07-20, 09:44, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> To fix a build error in drivers/scsi/lpfc/lpfc_sli.c when
> CONFIG_CPU_FREQ is not set/enabled, add a stub function for
> get_cpu_idle_time() in <linux/cpufreq.h>.
> 
> ../drivers/scsi/lpfc/lpfc_sli.c: In function ‘lpfc_init_idle_stat_hb’:
> ../drivers/scsi/lpfc/lpfc_sli.c:7330:26: error: implicit declaration of function ‘get_cpu_idle_time’; did you mean ‘set_cpu_active’? [-Werror=implicit-function-declaration]

And why is lpfc_sli.c using a cpufreq (supposedly internal, i.e. for
cpufreq related parts) routine ? I think if you really need this, then
it should be moved to a better common place and let everyone use it.

I also see that drivers/macintosh/rack-meter.c has its own
implementation for this.

>    idle_stat->prev_idle = get_cpu_idle_time(i, &wall, 1);
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linux-pm@vger.kernel.org
> Cc: James Smart <james.smart@broadcom.com>
> Cc: Dick Kennedy <dick.kennedy@broadcom.com>
> Cc: linux-scsi@vger.kernel.org
> ---
>  include/linux/cpufreq.h |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- linux-next-20200706.orig/include/linux/cpufreq.h
> +++ linux-next-20200706/include/linux/cpufreq.h
> @@ -237,6 +237,10 @@ static inline unsigned int cpufreq_get_h
>  {
>  	return 0;
>  }
> +static inline u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy)
> +{
> +	return 0;
> +}
>  static inline void disable_cpufreq(void) { }
>  #endif
>  

-- 
viresh

  reply	other threads:[~2020-07-07  3:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 16:44 [PATCH -next] cpufreq: add stub for get_cpu_idle_time() to fix scsi/lpfc driver build Randy Dunlap
2020-07-07  3:09 ` Viresh Kumar [this message]
2020-07-07 18:18   ` Randy Dunlap
2020-07-08  2:46     ` Viresh Kumar

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=20200707030943.xkocccy6qy2c3hrx@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).