linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Osterland-Heim <denis.osterland@diehl.com>
To: "pavel@ucw.cz" <pavel@ucw.cz>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"dmurphy@ti.com" <dmurphy@ti.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"jacek.anaszewski@gmail.com" <jacek.anaszewski@gmail.com>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"uwe@kleine-koenig.org" <uwe@kleine-koenig.org>
Subject: Re: [PATCH v4 3/5] leds: pwm: check result of led_pwm_set() in led_pwm_add()
Date: Sat, 21 Mar 2020 17:13:03 +0000	[thread overview]
Message-ID: <ca0008dcfe0a453fe0bfed3f7aea1206aeb2a93b.camel@diehl.com> (raw)
In-Reply-To: <20200321152037.GB8386@duo.ucw.cz>

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/

  reply	other threads:[~2020-03-21 17:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  8:15 [PATCH v4 0/5] leds: pwm: add support for default-state device Denis Osterland-Heim
2020-03-21  8:15 ` [PATCH v4 5/5] leds: pwm: add reference to common leds for default-state Denis Osterland-Heim
2020-03-21 15:15   ` Pavel Machek
2020-03-22  7:59     ` Denis Osterland-Heim
2020-03-31 17:36   ` Rob Herring
2020-03-21  8:15 ` [PATCH v4 3/5] leds: pwm: check result of led_pwm_set() in led_pwm_add() Denis Osterland-Heim
2020-03-21 15:20   ` Pavel Machek
2020-03-21 17:13     ` Denis Osterland-Heim [this message]
2020-03-22  7:51       ` Denis Osterland-Heim
2020-03-22 14:56     ` Jacek Anaszewski
2020-03-23  6:09       ` Denis Osterland-Heim
2020-03-23  9:08         ` Denis Osterland-Heim
2020-03-21  8:15 ` [PATCH v4 2/5] leds: pwm: remove useless pwm_period_ns Denis Osterland-Heim
2020-03-21  8:15 ` [PATCH v4 1/5] leds: pwm: remove header Denis Osterland-Heim
2020-03-21  8:15 ` [PATCH v4 4/5] leds: pwm: add support for default-state device property Denis Osterland-Heim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca0008dcfe0a453fe0bfed3f7aea1206aeb2a93b.camel@diehl.com \
    --to=denis.osterland@diehl.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=uwe@kleine-koenig.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).