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: <20180422191334.784f7723@bbrezillon>
Date:   Sun, 22 Apr 2018 19:13:34 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 29/61] mtd: devices: simplify getting .drvdata

On Thu, 19 Apr 2018 16:05:59 +0200
Wolfram Sang <wsa+renesas@...g-engineering.com> wrote:

> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Applied to mtd/next.

Thanks,

Boris

> ---
> 
> Build tested only. buildbot is happy. Please apply individually.
> 
>  drivers/mtd/devices/docg3.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
> index c594fe5eac08..802d8f159e90 100644
> --- a/drivers/mtd/devices/docg3.c
> +++ b/drivers/mtd/devices/docg3.c
> @@ -1470,8 +1470,7 @@ static struct docg3 *sysfs_dev2docg3(struct device *dev,
>  				     struct device_attribute *attr)
>  {
>  	int floor;
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct mtd_info **docg3_floors = platform_get_drvdata(pdev);
> +	struct mtd_info **docg3_floors = dev_get_drvdata(dev);
>  
>  	floor = attr->attr.name[1] - '0';
>  	if (floor < 0 || floor >= DOC_MAX_NBFLOORS)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ