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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11962635.BNa8PrgvAO@ada>
Date:   Mon, 28 Sep 2020 13:04:59 +0200
From:   Alexander Dahl <ada@...rsis.com>
To:     Pavel Machek <pavel@....cz>
Cc:     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,

Am Samstag, 19. September 2020, 11:44:18 CEST schrieb Pavel Machek:
> > Since commit 141f15c66d94 ("leds: pwm: remove header") that platform
> > interface is not usable from outside and there seems to be no in tree
> > user anymore.  All in-tree users of the leds-pwm driver seem to use DT
> > currently.  Getting rid of the old platform interface will allow the
> > leds-pwm driver to switch over from 'devm_led_classdev_register()' to
> > 'devm_led_classdev_register_ext()' later.
> > 
> > @@ -61,6 +56,7 @@ static int led_pwm_set(struct led_classdev *led_cdev,
> > 
> >  	return pwm_apply_state(led_dat->pwm, &led_dat->pwmstate);
> >  
> >  }
> > 
> > +__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.

Greets
Alex



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ