lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200930225757.wqz5x4th5ywfeduv@falbala.internal.home.lespocky.de>
Date:   Thu, 1 Oct 2020 00:57:58 +0200
From:   Alexander Dahl <post@...pocky.de>
To:     Pavel Machek <pavel@....cz>
Cc:     Alexander Dahl <ada@...rsis.com>,
        Alexander Dahl <post@...pocky.de>, linux-leds@...r.kernel.org,
        devicetree@...r.kernel.org,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Dan Murphy <dmurphy@...com>, Rob Herring <robh+dt@...nel.org>,
        linux-kernel@...r.kernel.org,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Marek Behún <marek.behun@....cz>,
        Denis Osterland-Heim <denis.osterland@...hl.com>
Subject: Re: [PATCH v5 1/3] leds: pwm: Remove platform_data support

Hello Pavel,

On Wed, Sep 30, 2020 at 07:24:41PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > > +__attribute__((nonnull))
> > > > 
> > > >  static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
> > > >  
> > > >  		       struct led_pwm *led, struct fwnode_handle *fwnode)
> > > >  
> > > >  {
> > > 
> > > This normally goes elsewhere -- right? I'd expect:
> > > 
> > > 
> > >   static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
> > >   		       struct led_pwm *led, struct fwnode_handle *fwnode)
> > > 	  __attribute__((nonnull))
> > 
> > I found both variants in kernel code.  I can live with both variants and have 
> > no strong preference.
> > 
> > My initial intention to add it was to get a compiler warning in case someone 
> > does not pass a fwnode here, e.g. when using that old platform_data approach 
> > (which is supposed to be removed with this patch).  You might call it a self 
> > check on my own changes.  I can also drop that attribute if you don't want 
> > that kind of stuff in linux-leds.
> 
> I'm okay with it at the second place :-).

Should have tried this before, but I actually did now. O:-)

If I move the attribute behind, I get this on a W=1 build:

    CC      drivers/leds/leds-pwm.o
  /home/alex/src/linux/leds/drivers/leds/leds-pwm.c:58:1: error: attributes should be specified before the declarator in a function definition
   static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
   ^~~~~~

Because it won't build then, I'll keep it where it is.  Meanwhile I
worked on all the DT remarks by Rob and I will send v6 soon.

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ