Skip to contentSkip to conversation

linux-next: build warning after merge of the devfreq tree

PATCH New Stephen Rothwell 4 participants 5 messages Aug 26, 2019 – Aug 28, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

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

Quoted 9 lines

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

maintainer
#2 lore raw

PATCH 1/1 PM / devfreq: passive: fix compiler warning

In reply to Stephen Rothwell

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

---
 drivers/devfreq/governor_passive.c | 1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/drivers/devfreq/governor_passive.c
index da48547..be6eeab 100644

drivers/devfreq/governor_passive.c +0 -0
@@ -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;
Signature · 1 line
2.7.4
maintainer
#3 lore raw
In reply to Stephen Rothwell

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

Quoted 18 lines · Stephen Rothwell

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

Signature · 2 lines
MyungJoo Ham, Ph.D.
S/W Center, Samsung Electronics