mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] tools/power/cpupower/utils/helpers/sysfs.c: drop negativity check on unsigned value
@ 2014-07-18 15:30 Andrey Utkin
  2014-07-19 19:14 ` Andrey Utkin
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Utkin @ 2014-07-18 15:30 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors
  Cc: dcb314, rafael.j.wysocki, trenn, linux, Andrey Utkin

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80621
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 tools/power/cpupower/utils/helpers/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c
index 851c7a1..09afe5d 100644
--- a/tools/power/cpupower/utils/helpers/sysfs.c
+++ b/tools/power/cpupower/utils/helpers/sysfs.c
@@ -81,7 +81,7 @@ int sysfs_is_cpu_online(unsigned int cpu)
 	close(fd);
 
 	value = strtoull(linebuf, &endp, 0);
-	if (value > 1 || value < 0)
+	if (value > 1)
 		return -EINVAL;
 
 	return value;
-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/5] tools/power/cpupower/utils/helpers/sysfs.c: drop negativity check on unsigned value
  2014-07-18 15:30 [PATCH 1/5] tools/power/cpupower/utils/helpers/sysfs.c: drop negativity check on unsigned value Andrey Utkin
@ 2014-07-19 19:14 ` Andrey Utkin
  2014-07-19 20:28   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Utkin @ 2014-07-19 19:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-janitors, dcb314, rafael.j.wysocki, trenn, linux,
	linux-pm, Andrey Utkin

Resubmitting to send also to linux-pm@vger.kernel.org as requested by
Rafael J. Wysocki <rafael.j.wysocki@intel.com>

---8<---

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80621
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 tools/power/cpupower/utils/helpers/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c
index 851c7a1..09afe5d 100644
--- a/tools/power/cpupower/utils/helpers/sysfs.c
+++ b/tools/power/cpupower/utils/helpers/sysfs.c
@@ -81,7 +81,7 @@ int sysfs_is_cpu_online(unsigned int cpu)
 	close(fd);
 
 	value = strtoull(linebuf, &endp, 0);
-	if (value > 1 || value < 0)
+	if (value > 1)
 		return -EINVAL;
 
 	return value;
-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/5] tools/power/cpupower/utils/helpers/sysfs.c: drop negativity check on unsigned value
  2014-07-19 19:14 ` Andrey Utkin
@ 2014-07-19 20:28   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-07-19 20:28 UTC (permalink / raw)
  To: Andrey Utkin
  Cc: linux-kernel, kernel-janitors, dcb314, rafael.j.wysocki, trenn,
	linux, linux-pm

On Saturday, July 19, 2014 10:14:04 PM Andrey Utkin wrote:
> Resubmitting to send also to linux-pm@vger.kernel.org as requested by
> Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> ---8<---
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80621
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>

Queued up for 3.17, thanks!

> ---
>  tools/power/cpupower/utils/helpers/sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c
> index 851c7a1..09afe5d 100644
> --- a/tools/power/cpupower/utils/helpers/sysfs.c
> +++ b/tools/power/cpupower/utils/helpers/sysfs.c
> @@ -81,7 +81,7 @@ int sysfs_is_cpu_online(unsigned int cpu)
>  	close(fd);
>  
>  	value = strtoull(linebuf, &endp, 0);
> -	if (value > 1 || value < 0)
> +	if (value > 1)
>  		return -EINVAL;
>  
>  	return value;
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-19 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 15:30 [PATCH 1/5] tools/power/cpupower/utils/helpers/sysfs.c: drop negativity check on unsigned value Andrey Utkin
2014-07-19 19:14 ` Andrey Utkin
2014-07-19 20:28   ` Rafael J. Wysocki

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®