lkml.org 
[lkml]   [2020]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v4 3/5] leds: pwm: check result of led_pwm_set() in led_pwm_add()
Date
Hi Pavel,

here it works.

$ git reset --hard origin/for-next
HEAD is now at 032426ff773f leds: lm3532: make bitfield 'enabled' unsigned
$ curl -s https://lore.kernel.org/patchwork/patch/1213548/mbox/ | git am
Applying: leds: pwm: check result of led_pwm_set() in led_pwm_add()

Strange is that the From: tag in 7bbec6c4b51d is not evaluated at your side.
When I do it, I get:

$ git reset --hard 7a6303677598
HEAD is now at 7a6303677598 leds: leds-is31fl32xx: Replace zero-length array with flexible-array member
$ curl -s https://lore.kernel.org/patchwork/patch/1212782/mbox/ | git am
Applying: leds: leds-pwm: Replace zero-length array with flexible-array member
$ git show
commit e247ae982b5ba113cc9668bec578105645137fb2 (HEAD -> for-next)
Author: Gustavo A. R. Silva <gustavo@embeddedor.com>
Date: Thu Mar 19 16:51:46 2020 -0500

leds: leds-pwm: Replace zero-length array with flexible-array member

Regards Denis

Am Samstag, den 21.03.2020, 16:20 +0100 schrieb Pavel Machek:
> Hi!
>
> > led_pwm_set() now returns an error when setting the PWM fails.
> >
> > Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
> > Signed-off-by: Denis Osterland-Heim <Denis.Osterland@diehl.com>
>
> I applied 1 and 2, but 3 failed for me. I'll push updated -next, can
> you see what is going on there?
>
> Best regards,
> Pavel
>
> > +++ b/drivers/leds/leds-pwm.c
> > @@ -91,15 +91,21 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
> > pwm_init_state(led_data->pwm, &led_data->pwmstate);
> >
> > ret = devm_led_classdev_register(dev, &led_data->cdev);
> > - if (ret == 0) {
> > - priv->num_leds++;
> > - led_pwm_set(&led_data->cdev, led_data->cdev.brightness);
> > - } else {
> > + if (ret) {
> > dev_err(dev, "failed to register PWM led for %s: %d\n",
> > led->name, ret);
> > + return ret;
> > }
> >
> > - return ret;
> > + ret = led_pwm_set(&led_data->cdev, led_data->cdev.brightness);
> > + if (ret) {
> > + dev_err(dev, "failed to set led PWM value for %s: %d",
> > + led->name, ret);
> > + return ret;
> > + }
> > +
> > + priv->num_leds++;
> > + return 0;
> > }
> >
> > static int led_pwm_create_fwnode(struct device *dev, struct
> > led_pwm_priv *priv)
> >
> > The contents of the above mentioned e-mail is not legally
> > binding. This e-mail contains confidential and/or legally protected
> > information. Please inform us if you have received this e-mail by
>
> This is lie. Please don't do this.
> Pavel
> +----------------------------------------------------------------------+
> > Z1 SecureMail Gateway Processing Info |
>
> +----------------------------------------------------------------------+
> > - The message was signed by |
> > [No Info available] |
> > Signature not verifiable |
> > - Message content not verifiable |
> > - Certificate not verifiable |
>
> +----------------------------------------------------------------------+


Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
- For general information on data protection and your respective rights please visit https://www.diehl.com/group/en/transparency-and-information-obligations/
\
 
 \ /
  Last update: 2020-03-21 18:14    [W:0.083 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site