Re: [PATCH 3/4] PM / devfreq: Add devfreq_governor_start/stop()

From: Matthias Kaehlcke
Date: Thu Feb 14 2019 - 13:30:13 EST


On Thu, Feb 14, 2019 at 11:12:55PM +0900, Chanwoo Choi wrote:
> Hi Matthias,
>
> Looks good to me for making the function to remove the duplicate code.
> But, When I just tested the kernel build, following warnings occur
> about devfreq_governor_stop().
>
> In file included from ./include/linux/devfreq.h:16:0,
> from drivers/devfreq/devfreq.c:23:
> drivers/devfreq/devfreq.c: In function âdevfreq_governor_stopâ:
> drivers/devfreq/devfreq.c:619:17: warning: format â%sâ expects
> argument of type âchar *â, but argument 4 has type âintâ [-Wformat=]
> dev_warn(dev, "%s: Governor %s not stopped: %d\n",
> ^
> ./include/linux/device.h:1380:22: note: in definition of macro âdev_fmtâ
> #define dev_fmt(fmt) fmt
> ^
> drivers/devfreq/devfreq.c:619:3: note: in expansion of macro âdev_warnâ
> dev_warn(dev, "%s: Governor %s not stopped: %d\n",
> ^
> drivers/devfreq/devfreq.c:619:17: warning: format â%dâ expects a
> matching âintâ argument [-Wformat=]
> dev_warn(dev, "%s: Governor %s not stopped: %d\n",
> ^
> ./include/linux/device.h:1380:22: note: in definition of macro âdev_fmtâ
> #define dev_fmt(fmt) fmt
> ^
> drivers/devfreq/devfreq.c:619:3: note: in expansion of macro âdev_warnâ
> dev_warn(dev, "%s: Governor %s not stopped: %d\n",

For some reason the warnings don't pop up in my 4.19 build and I
missed them when compile testing upstream :(

I'll fix the format string in the next version.

Thanks for the review and build test!

Matthias