LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Frans Klaver <fransklaver@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH 01/60] mtd: core: tone down suggestion that dev.parent should be set
Date: Mon, 9 Mar 2015 16:14:38 -0700	[thread overview]
Message-ID: <20150309230250.GA13266@ld-irv-0074> (raw)
In-Reply-To: <1425418844-25177-2-git-send-email-fransklaver@gmail.com>

On Tue, Mar 03, 2015 at 10:39:45PM +0100, Frans Klaver wrote:
> add_mtd_device() has a comment suggesting that the caller should have
> set dev.parent. This is required to have the device show up in sysfs,

What do you mean "have the device show up in sysfs"? AFAICT, this only
has bearing on whether the *parent* device shows up as a sysfs symlink
within the MTD device directory. i.e.:

   /sys/class/mtd/mtd*/device

For instance, this sort of symlink:

   /sys/class/mtd/mtd0/device -> ../../../f03e2800.nand

It might be good to clarify this in the commit message, since you make
the problem sound worse than (I think) it is.

Brian

> but not for proper operation of the mtd device itself. Currently we have
> five drivers registering mtd devices during module initialization, so
> they don't actually provide a parent device to link to. That means we
> cannot WARN_ON() here, as it would trigger false positives.
> 
> Make the comment a bit less firm in its assertion that dev.parent should
> be set.
> 
> Signed-off-by: Frans Klaver <fransklaver@gmail.com>
> ---
>  drivers/mtd/mtdcore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> index 11883bd..2093676 100644
> --- a/drivers/mtd/mtdcore.c
> +++ b/drivers/mtd/mtdcore.c
> @@ -422,7 +422,7 @@ int add_mtd_device(struct mtd_info *mtd)
>  	}
>  
>  	/* Caller should have set dev.parent to match the
> -	 * physical device.
> +	 * physical device, if appropriate.
>  	 */
>  	mtd->dev.type = &mtd_devtype;
>  	mtd->dev.class = &mtd_class;
> -- 
> 2.2.2
> 

  reply	other threads:[~2015-03-09 23:14 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 21:39 [PATCH 00/60] Fix mtds not showing up in sysfs Frans Klaver
2015-03-03 21:39 ` [PATCH 01/60] mtd: core: tone down suggestion that dev.parent should be set Frans Klaver
2015-03-09 23:14   ` Brian Norris [this message]
2015-03-10  7:47     ` Frans Klaver
2015-03-10 17:39       ` Brian Norris
2015-03-11  8:03         ` Frans Klaver
2015-04-10  4:30           ` Brian Norris
2015-04-10  5:31             ` Frans Klaver
2015-03-03 21:39 ` [PATCH 02/60] mtd: core: set some defaults when dev.parent is set Frans Klaver
2015-05-08 10:01   ` Frans Klaver
2015-03-03 21:39 ` [PATCH 03/60] mtd: devices: bcm47xxflash: show device in sysfs Frans Klaver
2015-03-03 21:39 ` [PATCH 04/60] mtd: devices: docg3: " Frans Klaver
2015-03-03 21:39 ` [PATCH 05/60] mtd: devices: m25p80: " Frans Klaver
2015-03-03 21:39 ` [PATCH 06/60] mtd: devices: mtd_dataflash: drop owner assignment Frans Klaver
2015-03-03 21:39 ` [PATCH 07/60] mtd: devices: spear_smi: show device in sysfs Frans Klaver
2015-03-03 21:39 ` [PATCH 08/60] mtd: devices: sst251: " Frans Klaver
2015-03-03 21:39 ` [PATCH 09/60] mtd: lpddr: " Frans Klaver
2015-03-03 21:39 ` [PATCH 10/60] mtd: maps: bfin-async-flash: " Frans Klaver
2015-03-03 21:39 ` [PATCH 11/60] mtd: maps: gpio-addr-flash: " Frans Klaver
2015-03-03 21:39 ` [PATCH 12/60] mtd: maps: intel_vr_nor: " Frans Klaver
2015-03-03 21:39 ` [PATCH 13/60] mtd: maps: ixp4xx: " Frans Klaver
2015-03-03 21:39 ` [PATCH 14/60] mtd: maps: lantiq-flash: " Frans Klaver
2015-03-03 21:39 ` [PATCH 15/60] mtd: maps: latch-addr-flash: " Frans Klaver
2015-03-03 21:40 ` [PATCH 16/60] mtd: maps: physmap: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 17/60] mtd: maps: physmap_of: " Frans Klaver
2015-03-03 21:40 ` [PATCH 18/60] mtd: maps: plat_ram: " Frans Klaver
2015-03-03 21:40 ` [PATCH 19/60] mtd: maps: pxa2xx-flash: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 20/60] mtd: maps: rbtx4939-flash: " Frans Klaver
2015-03-03 21:40 ` [PATCH 21/60] mtd: maps: sa1100-flash: " Frans Klaver
2015-03-03 21:40 ` [PATCH 22/60] mtd: nand: atmel_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 23/60] mtd: nand: au1550nd: " Frans Klaver
2015-03-03 21:40 ` [PATCH 24/60] mtd: nand: bcm47xxnflash: " Frans Klaver
2015-03-03 21:40 ` [PATCH 25/60] mtd: nand: bf5xx_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 26/60] mtd: nand: cafe_nand: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 27/60] mtd: nand: davinci_nand: drop owner and name assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 28/60] mtd: nand: denali: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 29/60] mtd: nand: docg4: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 30/60] mtd: nand: fsl_elbc_nand: " Frans Klaver
2015-03-10  6:28   ` Brian Norris
2015-03-10  7:42     ` Frans Klaver
2015-03-03 21:40 ` [PATCH 31/60] mtd: nand: fsl_ifc_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 32/60] mtd: nand: fsl_upm: " Frans Klaver
2015-03-03 21:40 ` [PATCH 33/60] mtd: nand: fsmc_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 34/60] mtd: nand: gpio: " Frans Klaver
2015-03-03 21:40 ` [PATCH 35/60] mtd: nand: gpmi-nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 36/60] mtd: nand: hisi504_nand: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 37/60] mtd: nand: jz4740_nand: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 38/60] mtd: nand: lpc32xx_mlc: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 39/60] mtd: nand: mpc5121_nfc: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 40/60] mtd: nand: mxc_nand: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 41/60] mtd: nand: ndfc: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 42/60] mtd: nand: nuc900_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 43/60] mtd: nand: omap2: show device structure " Frans Klaver
2015-03-03 21:40 ` [PATCH 44/60] mtd: nand: orion_nand: show device " Frans Klaver
2015-03-03 21:40 ` [PATCH 45/60] mtd: nand: pasemi_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 46/60] mtd: nand: plat_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 47/60] mtd: nand: pxa3xx_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 48/60] mtd: nand: r852: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 49/60] mtd: nand: s3c2410: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 50/60] mtd: nand: sh_flctl: " Frans Klaver
2015-03-03 21:40 ` [PATCH 51/60] mtd: nand: sharpsl: " Frans Klaver
2015-03-03 21:40 ` [PATCH 52/60] mtd: nand: socrates_nand: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 53/60] mtd: nand: sunxi_nand: " Frans Klaver
2015-03-03 21:40 ` [PATCH 54/60] mtd: nand: tmio_nand: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 55/60] mtd: nand: txx9ndfmc: " Frans Klaver
2015-03-03 21:40 ` [PATCH 56/60] mtd: onenand: generic: " Frans Klaver
2015-03-03 21:40 ` [PATCH 57/60] mtd: onenand: omap2: drop owner and name assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 58/60] mtd: onenand: samsung: drop owner assignment Frans Klaver
2015-03-03 21:40 ` [PATCH 59/60] mtd: spi-nor: fsl-quadspi: show device in sysfs Frans Klaver
2015-03-03 21:40 ` [PATCH 60/60] staging: mt29f_spinand: " Frans Klaver
2015-03-06 23:59   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150309230250.GA13266@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=fransklaver@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --subject='Re: [PATCH 01/60] mtd: core: tone down suggestion that dev.parent should be set' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).