All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hid: thingm: remove not needed error message
@ 2016-04-20 18:33 Heiner Kallweit
  2016-04-25  7:35 ` Benjamin Tissoires
  2016-04-25  9:31 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2016-04-20 18:33 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input

LED core takes care of handling failed calls to thingm_let_set.
- print error message in set_brightness_delayed or
- pass error to caller in led_set_brightness_sync
Also the error message here doesn't provide any hint what actually
went wrong. Therefore remove it.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/hid/hid-thingm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/hid/hid-thingm.c b/drivers/hid/hid-thingm.c
index 2507bbe..9ad9c6e 100644
--- a/drivers/hid/hid-thingm.c
+++ b/drivers/hid/hid-thingm.c
@@ -148,13 +148,8 @@ static int thingm_led_set(struct led_classdev *ldev,
 			  enum led_brightness brightness)
 {
 	struct thingm_led *led = container_of(ldev, struct thingm_led, ldev);
-	int ret;
-
-	ret = thingm_write_color(led->rgb);
-	if (ret)
-		hid_err(led->rgb->tdev->hdev, "failed to write color\n");
 
-	return ret;
+	return thingm_write_color(led->rgb);
 }
 
 static int thingm_init_led(struct thingm_led *led, const char *color_name,
-- 
2.8.0


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

* Re: [PATCH] hid: thingm: remove not needed error message
  2016-04-20 18:33 [PATCH] hid: thingm: remove not needed error message Heiner Kallweit
@ 2016-04-25  7:35 ` Benjamin Tissoires
  2016-04-25  9:31 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2016-04-25  7:35 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Jiri Kosina, linux-input

On Apr 20 2016 or thereabouts, Heiner Kallweit wrote:
> LED core takes care of handling failed calls to thingm_let_set.
> - print error message in set_brightness_delayed or
> - pass error to caller in led_set_brightness_sync
> Also the error message here doesn't provide any hint what actually
> went wrong. Therefore remove it.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Works for me:

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@rehat.com>

> ---
>  drivers/hid/hid-thingm.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/hid/hid-thingm.c b/drivers/hid/hid-thingm.c
> index 2507bbe..9ad9c6e 100644
> --- a/drivers/hid/hid-thingm.c
> +++ b/drivers/hid/hid-thingm.c
> @@ -148,13 +148,8 @@ static int thingm_led_set(struct led_classdev *ldev,
>  			  enum led_brightness brightness)
>  {
>  	struct thingm_led *led = container_of(ldev, struct thingm_led, ldev);
> -	int ret;
> -
> -	ret = thingm_write_color(led->rgb);
> -	if (ret)
> -		hid_err(led->rgb->tdev->hdev, "failed to write color\n");
>  
> -	return ret;
> +	return thingm_write_color(led->rgb);
>  }
>  
>  static int thingm_init_led(struct thingm_led *led, const char *color_name,
> -- 
> 2.8.0
> 

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

* Re: [PATCH] hid: thingm: remove not needed error message
  2016-04-20 18:33 [PATCH] hid: thingm: remove not needed error message Heiner Kallweit
  2016-04-25  7:35 ` Benjamin Tissoires
@ 2016-04-25  9:31 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2016-04-25  9:31 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Benjamin Tissoires, linux-input

On Wed, 20 Apr 2016, Heiner Kallweit wrote:

> LED core takes care of handling failed calls to thingm_let_set.
> - print error message in set_brightness_delayed or
> - pass error to caller in led_set_brightness_sync
> Also the error message here doesn't provide any hint what actually
> went wrong. Therefore remove it.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2016-04-25  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 18:33 [PATCH] hid: thingm: remove not needed error message Heiner Kallweit
2016-04-25  7:35 ` Benjamin Tissoires
2016-04-25  9:31 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.