linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 06/12] asus_acpi: don't printk on writing garbage to proc files
@ 2006-10-10 21:20 akpm
  2006-10-14  8:07 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2006-10-10 21:20 UTC (permalink / raw)
  To: len.brown; +Cc: linux-acpi, akpm, adobriyan

From: Alexey Dobriyan <adobriyan@gmail.com>

* This reporting is useless (you get errno anyway).
* This reporting is already inconsistent in driver.
* Looks like created files in proc are rw-rw-rw- by default.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/acpi/asus_acpi.c |   10 +---------
 1 files changed, 1 insertion(+), 9 deletions(-)

diff -puN drivers/acpi/asus_acpi.c~asus_acpi-dont-printk-on-writing-garbage-to-proc-files drivers/acpi/asus_acpi.c
--- a/drivers/acpi/asus_acpi.c~asus_acpi-dont-printk-on-writing-garbage-to-proc-files
+++ a/drivers/acpi/asus_acpi.c
@@ -629,9 +629,7 @@ proc_write_ledd(struct file *file, const
 			       "Asus ACPI: LED display write failed\n");
 		else
 			hotk->ledd_status = (u32) value;
-	} else if (rv < 0)
-		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
-
+	}
 	return rv;
 }
 
@@ -849,10 +847,7 @@ proc_write_brn(struct file *file, const 
 		value = (0 < value) ? ((15 < value) ? 15 : value) : 0;
 		/* 0 <= value <= 15 */
 		set_brightness(value);
-	} else if (rv < 0) {
-		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
 	}
-
 	return rv;
 }
 
@@ -897,9 +892,6 @@ proc_write_disp(struct file *file, const
 	rv = parse_arg(buffer, count, &value);
 	if (rv > 0)
 		set_display(value);
-	else if (rv < 0)
-		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
-
 	return rv;
 }
 
_

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

* Re: [patch 06/12] asus_acpi: don't printk on writing garbage to proc files
  2006-10-10 21:20 [patch 06/12] asus_acpi: don't printk on writing garbage to proc files akpm
@ 2006-10-14  8:07 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2006-10-14  8:07 UTC (permalink / raw)
  To: akpm; +Cc: linux-acpi, adobriyan

Applied.

thanks,
-Len

On Tuesday 10 October 2006 17:20, akpm@osdl.org wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> 
> * This reporting is useless (you get errno anyway).
> * This reporting is already inconsistent in driver.
> * Looks like created files in proc are rw-rw-rw- by default.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
> 
>  drivers/acpi/asus_acpi.c |   10 +---------
>  1 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff -puN drivers/acpi/asus_acpi.c~asus_acpi-dont-printk-on-writing-garbage-to-proc-files drivers/acpi/asus_acpi.c
> --- a/drivers/acpi/asus_acpi.c~asus_acpi-dont-printk-on-writing-garbage-to-proc-files
> +++ a/drivers/acpi/asus_acpi.c
> @@ -629,9 +629,7 @@ proc_write_ledd(struct file *file, const
>  			       "Asus ACPI: LED display write failed\n");
>  		else
>  			hotk->ledd_status = (u32) value;
> -	} else if (rv < 0)
> -		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
> -
> +	}
>  	return rv;
>  }
>  
> @@ -849,10 +847,7 @@ proc_write_brn(struct file *file, const 
>  		value = (0 < value) ? ((15 < value) ? 15 : value) : 0;
>  		/* 0 <= value <= 15 */
>  		set_brightness(value);
> -	} else if (rv < 0) {
> -		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
>  	}
> -
>  	return rv;
>  }
>  
> @@ -897,9 +892,6 @@ proc_write_disp(struct file *file, const
>  	rv = parse_arg(buffer, count, &value);
>  	if (rv > 0)
>  		set_display(value);
> -	else if (rv < 0)
> -		printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
> -
>  	return rv;
>  }
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

end of thread, other threads:[~2006-10-14  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 21:20 [patch 06/12] asus_acpi: don't printk on writing garbage to proc files akpm
2006-10-14  8:07 ` Len Brown

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).