2019-08-26 11:51:44

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the devfreq tree

Hi all,

After merging the devfreq tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/devfreq/governor_passive.c: In function 'devfreq_passive_event_handler':
drivers/devfreq/governor_passive.c:152:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev = devfreq->dev.parent;
^~~

Introduced by commit

0ef7c7cce43f ("PM / devfreq: passive: Use non-devm notifiers")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-08-26 13:25:12

by Leonard Crestez

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the devfreq tree

On 26.08.2019 14:50, Stephen Rothwell wrote:
> Hi all,
>
> After merging the devfreq tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/devfreq/governor_passive.c: In function 'devfreq_passive_event_handler':
> drivers/devfreq/governor_passive.c:152:17: warning: unused variable 'dev' [-Wunused-variable]
> struct device *dev = devfreq->dev.parent;
> ^~~
>
> Introduced by commit
>
> 0ef7c7cce43f ("PM / devfreq: passive: Use non-devm notifiers")
>
An older version was merged somehow, this was fixed in v3:
https://patchwork.kernel.org/patch/11091793/

--
Regards,
Leonard

2019-08-26 13:26:40

by MyungJoo Ham

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the devfreq tree

Thank you for pointing this out!

I've added a fix to the tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/log/?h=for-next
(and shared the patch in a previous reply)

Rafael, could you please pull the fix from the git repo above?


Cheers,
MyungJoo

On Mon, Aug 26, 2019 at 8:51 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the devfreq tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/devfreq/governor_passive.c: In function 'devfreq_passive_event_handler':
> drivers/devfreq/governor_passive.c:152:17: warning: unused variable 'dev' [-Wunused-variable]
> struct device *dev = devfreq->dev.parent;
> ^~~
>
> Introduced by commit
>
> 0ef7c7cce43f ("PM / devfreq: passive: Use non-devm notifiers")
>
> --
> Cheers,
> Stephen Rothwell



--
MyungJoo Ham, Ph.D.
S/W Center, Samsung Electronics

2019-08-26 13:27:03

by MyungJoo Ham

[permalink] [raw]
Subject: [PATCH] PM / devfreq: passive: fix compiler warning

The recent commit of
PM / devfreq: passive: Use non-devm notifiers
had incurred compiler warning, "unused variable 'dev'".

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: MyungJoo Ham <[email protected]>
---
drivers/devfreq/governor_passive.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/devfreq/governor_passive.c
b/drivers/devfreq/governor_passive.c
index da48547..be6eeab 100644
--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -149,7 +149,6 @@ static int devfreq_passive_notifier_call(struct
notifier_block *nb,
static int devfreq_passive_event_handler(struct devfreq *devfreq,
unsigned int event, void *data)
{
- struct device *dev = devfreq->dev.parent;
struct devfreq_passive_data *p_data
= (struct devfreq_passive_data *)devfreq->data;
struct devfreq *parent = (struct devfreq *)p_data->parent;
--
2.7.4

2019-08-28 09:09:16

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the devfreq tree

On Monday, August 26, 2019 2:46:08 PM CEST MyungJoo Ham wrote:
> Thank you for pointing this out!
>
> I've added a fix to the tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/log/?h=for-next
> (and shared the patch in a previous reply)
>
> Rafael, could you please pull the fix from the git repo above?

Done, thanks!