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: <1524729349.21176.614.camel@linux.intel.com>
Date:   Thu, 26 Apr 2018 10:55:49 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Javier Arteaga <javier@...tex.com>
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>, Dan O'Donovan <dan@...tex.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Lee Jones <lee.jones@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

On Thu, 2018-04-26 at 03:34 +0100, Javier Arteaga wrote:
> On Wed, Apr 25, 2018 at 07:15:45PM +0300, Andy Shevchenko wrote:
> > On Sat, 2018-04-21 at 09:50 +0100, Javier Arteaga wrote:

> > > +static int __init upboard_led_probe(struct platform_device *pdev)
> > 
> > Are you sure about __init here?
> 
> Not 100% now :)
> 
> My understanding was that in this context, __init allows this probe()
> to
> be dropped from memory after module load.
> 
> What am I doing wrong there?

Just give another thought about it. The keyword(s) here is(are): time to
live of the objects in question. It's good to get knowing what unbind-
bind means (for built-in drivers).

> > > +	struct upboard_led_data * const pdata = pdev-
> > > > dev.platform_data;
> > 
> > Don't use direct dereference to platform_data.
> 
> Sorry, I don't understand this one. What's the alternative?

See other drivers how they do that stuff. Hint: check inline functions
in include/linux/device.h.

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ