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] [day] [month] [year] [list]
Message-ID: <CAH6sp9MqyUaPUNLJd+tEHzFH9mic71HxLNfnuYswuf=KdnZr7Q@mail.gmail.com>
Date:	Tue, 13 Oct 2015 19:41:00 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Brian Norris <computersforpeace@...il.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v2 05/60] mtd: devices: m25p80: show parent device in sysfs

On Tue, Oct 13, 2015 at 7:37 PM, Brian Norris
<computersforpeace@...il.com> wrote:
> On Wed, Jun 10, 2015 at 10:38:19PM +0200, Frans Klaver wrote:
>> Fix a bug where mtd parent device symlinks aren't shown in sysfs.
>>
>> Signed-off-by: Frans Klaver <fransklaver@...il.com>
>
> This is one of the patches that didn't apply...
>
>> ---
>>  drivers/mtd/devices/m25p80.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
>> index 3af137f..dfa6ee0 100644
>> --- a/drivers/mtd/devices/m25p80.c
>> +++ b/drivers/mtd/devices/m25p80.c
>> @@ -206,6 +206,7 @@ static int m25p_probe(struct spi_device *spi)
>>
>>       spi_set_drvdata(spi, flash);
>>       flash->mtd.priv = nor;
>> +     flash->mtd.dev.parent = &spi->dev;
>
> ...but I don't think this patch is actually necessary. See
> spi_nor_scan(), which assigns mtd->dev.parent for us. So as long as the
> driver assigns the spi_nor::dev field, the spi-nor framework handles
> this for us.
>
> Same comment applies to fsl-quadspi.c (patch 59), which also didn't
> apply cleanly. So I don't think we need either of these patches.

Sure. Feel free to drop them. The main reason these patches exist is
based on the fact that these files didn't contain the "dev.parent ="
pattern. I tried to only add those necessary based on code inspection,
so it is very well possible that we don't need them. If someone runs
into it on these drivers, that's the time to fix it I guess.

Thanks,
Frans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ