mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: rjw@sisk.pl, sboyd@codeaurora.org, viresh.kumar@linaro.org
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] cpufreq: Use signed type for 'ret' variable, to store negative error values
Date: Sat, 07 Sep 2013 01:24:06 +0530	[thread overview]
Message-ID: <20130906195404.26919.21905.stgit@srivatsabhat.in.ibm.com> (raw)
In-Reply-To: <20130906195206.26919.20884.stgit@srivatsabhat.in.ibm.com>

There are places where the variable 'ret' is declared as unsigned int
and then used to store negative return values such as -EINVAL. Fix them
by declaring the variable as a signed quantity.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 9909789..9cc5609 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -460,7 +460,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *policy,
 static ssize_t store_##file_name					\
 (struct cpufreq_policy *policy, const char *buf, size_t count)		\
 {									\
-	unsigned int ret;						\
+	int ret;							\
 	struct cpufreq_policy new_policy;				\
 									\
 	ret = cpufreq_get_policy(&new_policy, policy->cpu);		\
@@ -513,7 +513,7 @@ static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf)
 static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
 					const char *buf, size_t count)
 {
-	unsigned int ret;
+	int ret;
 	char	str_governor[16];
 	struct cpufreq_policy new_policy;
 


      parent reply	other threads:[~2013-09-06 19:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 19:52 [PATCH 0/5] Cpufreq fixes related to cpu hotplug/sysfs-writes Srivatsa S. Bhat
2013-09-06 19:53 ` [PATCH 1/5] cpufreq: Split __cpufreq_remove_dev() into 2 parts (kobj cleanup & the rest) Srivatsa S. Bhat
2013-09-06 19:53 ` [PATCH 2/5] cpufreq: Invoke __cpufreq_remove_dev_finish() after releasing cpu_hotplug.lock Srivatsa S. Bhat
2013-09-06 19:53 ` [PATCH 3/5] cpufreq: Synchronize the cpufreq store_*() routines with CPU hotplug Srivatsa S. Bhat
2013-09-06 19:53 ` [PATCH 4/5] cpufreq: Remove temporary fix for race between CPU hotplug and sysfs-writes Srivatsa S. Bhat
2013-09-10  7:09   ` Viresh Kumar
2013-09-10  8:57     ` Srivatsa S. Bhat
2013-09-06 19:54 ` Srivatsa S. Bhat [this message]

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=20130906195404.26919.21905.stgit@srivatsabhat.in.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=sboyd@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    /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

all inboxes | Powered by JetHome®