Hi all,

After merging the pm tree, today's linux-next build (x86_64 allnoconfig)
failed like this:

In file included from kernel/power/qos.c:33:
include/linux/pm_qos.h: In function 'dev_pm_qos_read_value':
include/linux/pm_qos.h:205:9: error: expected '(' before 'type'
  switch type {
         ^~~~
         (
include/linux/pm_qos.h:205:9: warning: statement with no effect [-Wunused-value]
  switch type {
         ^~~~
include/linux/pm_qos.h:216:1: warning: no return statement in function 
returning non-void [-Wreturn-type]
 }
 ^
include/linux/pm_qos.h: At top level:
include/linux/pm_qos.h:231:4: error: expected identifier or '(' before '{' token
    { return 0; }
    ^
In file included from kernel/power/qos.c:33:
include/linux/pm_qos.h:228:19: warning: 'dev_pm_qos_add_notifier' declared 
'static' but never defined [-Wunused-function]
 static inline int dev_pm_qos_add_notifier(struct device *dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~

Caused by commits

  024a47a2732d ("PM / QOS: Pass request type to 
dev_pm_qos_{add|remove}_notifier()")
  57fa6137402b ("PM / QOS: Pass request type to dev_pm_qos_read_value()")

I applied the following fix patch for today:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Thu, 4 Jul 2019 19:36:25 +1000
Subject: [PATCH] PM / QOS: fix typos

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 include/linux/pm_qos.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 17132b10b233..2aebbc5b9950 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -202,7 +202,7 @@ static inline s32 __dev_pm_qos_resume_latency(struct device 
*dev)
 static inline s32 dev_pm_qos_read_value(struct device *dev,
                                        enum dev_pm_qos_req_type type)
 {
-       switch type {
+       switch (type) {
        case DEV_PM_QOS_RESUME_LATENCY:
                return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT;
        case DEV_PM_QOS_MIN_FREQUENCY:
@@ -227,7 +227,7 @@ static inline int dev_pm_qos_remove_request(struct 
dev_pm_qos_request *req)
                        { return 0; }
 static inline int dev_pm_qos_add_notifier(struct device *dev,
                                          struct notifier_block *notifier,
-                                         enum dev_pm_qos_req_type type);
+                                         enum dev_pm_qos_req_type type)
                        { return 0; }
 static inline int dev_pm_qos_remove_notifier(struct device *dev,
                                             struct notifier_block *notifier,
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgpwUWqvCpa4y.pgp
Description: OpenPGP digital signature

Reply via email to