From: Deva Ramasubramanian <dramasub@codeaurora.org>
To: MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Cc: Deva Ramasubramanian <dramasub@codeaurora.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] PM / devfreq: Fix faulty error message
Date: Tue, 17 Mar 2015 13:59:26 -0700 [thread overview]
Message-ID: <1426625966-22187-1-git-send-email-dramasub@codeaurora.org> (raw)
The misleading log "releasing devfreq which doesn't exist" prints out
for well behaved clients. This is due to the fact that _remove_devfreq
calls itself recursively by proxy (via put_device()). The second time
_devfreq_remove is called the respective device has already been
deleted, causing the misleading warning.
So just skip printing the message if _devfreq_remove was called via
put_device().
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
---
drivers/devfreq/devfreq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 30b538d8..bee59db 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -399,7 +399,8 @@ static void _remove_devfreq(struct devfreq *devfreq)
mutex_lock(&devfreq_list_lock);
if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
mutex_unlock(&devfreq_list_lock);
- dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
+ if (!skip)
+ dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
return;
}
list_del(&devfreq->node);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next reply other threads:[~2015-03-17 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 20:59 Deva Ramasubramanian [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-03-18 4:12 [PATCH] PM / devfreq: Fix faulty error message MyungJoo Ham
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=1426625966-22187-1-git-send-email-dramasub@codeaurora.org \
--to=dramasub@codeaurora.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/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).