mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity
@ 2014-07-14 22:56 Andrey Utkin
  2014-07-14 23:02 ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Utkin @ 2014-07-14 22:56 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors, platform-driver-x86,
	ibm-acpi-devel, ibm-acpi
  Cc: matthew.garrett, Andrey Utkin

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80231
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index d82f196..4d59b09 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6144,7 +6144,7 @@ static int brightness_set(unsigned int value)
 {
 	int res;
 
-	if (value > bright_maxlvl || value < 0)
+	if (value > bright_maxlvl)
 		return -EINVAL;
 
 	vdbg_printk(TPACPI_DBG_BRGHT,
-- 
1.8.5.5


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

* Re: [PATCH] drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity
  2014-07-14 22:56 [PATCH] drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity Andrey Utkin
@ 2014-07-14 23:02 ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 2+ messages in thread
From: Henrique de Moraes Holschuh @ 2014-07-14 23:02 UTC (permalink / raw)
  To: Andrey Utkin
  Cc: linux-kernel, kernel-janitors, platform-driver-x86,
	ibm-acpi-devel, ibm-acpi, matthew.garrett

On Tue, 15 Jul 2014, Andrey Utkin wrote:
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80231
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>

Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

> ---
>  drivers/platform/x86/thinkpad_acpi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index d82f196..4d59b09 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -6144,7 +6144,7 @@ static int brightness_set(unsigned int value)
>  {
>  	int res;
>  
> -	if (value > bright_maxlvl || value < 0)
> +	if (value > bright_maxlvl)
>  		return -EINVAL;
>  
>  	vdbg_printk(TPACPI_DBG_BRGHT,

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

end of thread, other threads:[~2014-07-14 23:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14 22:56 [PATCH] drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity Andrey Utkin
2014-07-14 23:02 ` Henrique de Moraes Holschuh

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®