From: Brian Norris <computersforpeace@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>,
linux-sh@vger.kernel.org,
Kevin Hilman <khilman@deeprootsystems.com>,
Magnus Damm <magnus.damm@gmail.com>, Sekhar Nori <nsekhar@ti.com>,
Simon Horman <horms@verge.net.au>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: don't set unused name in struct flash_platform_data
Date: Tue, 21 Oct 2014 23:10:57 -0700 [thread overview]
Message-ID: <20141022061057.GC16128@brian-ubuntu> (raw)
In-Reply-To: <CACna6rw8dG4+nBkgNb+A_xfom=4rjh-nXJGeQ=4GgWHcZMJwMA@mail.gmail.com>
On Wed, Oct 22, 2014 at 08:03:45AM +0200, Rafał Miłecki wrote:
> On 22 October 2014 07:53, Brian Norris <computersforpeace@gmail.com> wrote:
> > On Mon, Sep 29, 2014 at 02:30:53PM +0200, Rafał Miłecki wrote:
> >> Loading correct SPI driver (m25p80) is handled using modalias from the
> >> struct spi_board_info. There is no point of setting name in the
> >> platform_data, m25p80 ignores it anyway.
> >
> > Wait, is 'name' actually ignored? It looks to me like it sets the MTD
> > name. See the comments in include/linux/spi/flash.h and
> > arch/arm/include/asm/mach/flash.h (BTW, why do we have two definitions
> > for this??):
> >
> > @name: optional flash device name (eg, as used with mtdparts=)
> >
> > And I think it's used for exactly that in m25p80.c:
> >
> > if (data && data->name)
> > flash->mtd.name = data->name;
>
> And very few lines later in the m25p80.c you have this:
> if (data && data->type)
> id = spi_nor_match_id(data->type);
How is that relevant to the value of 'flash->mtd.name'?
> Code I touched in my patch was using both: name and type. So what you
> got it "type" took a precedence and "name" value was ignored. It seems
> like ppl used to use "name" to trigger "m25p80" probe, which isn't
> needed (it's done by SPI layer).
>
> Also see my comment about data->type usage I added in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=32f1b7c8352fd33d41bcec3cfb054ccdcfd40a42
But I'm not talking about probing / driver matching. The 'name' field is
used for assigning the MTD name deterministically. This name is used for
things like 'mtdparts'.
Brian
WARNING: multiple messages have this Message-ID (diff)
From: Brian Norris <computersforpeace@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: don't set unused name in struct flash_platform_data
Date: Wed, 22 Oct 2014 06:10:57 +0000 [thread overview]
Message-ID: <20141022061057.GC16128@brian-ubuntu> (raw)
In-Reply-To: <CACna6rw8dG4+nBkgNb+A_xfom=4rjh-nXJGeQ=4GgWHcZMJwMA@mail.gmail.com>
On Wed, Oct 22, 2014 at 08:03:45AM +0200, Rafał Miłecki wrote:
> On 22 October 2014 07:53, Brian Norris <computersforpeace@gmail.com> wrote:
> > On Mon, Sep 29, 2014 at 02:30:53PM +0200, Rafał Miłecki wrote:
> >> Loading correct SPI driver (m25p80) is handled using modalias from the
> >> struct spi_board_info. There is no point of setting name in the
> >> platform_data, m25p80 ignores it anyway.
> >
> > Wait, is 'name' actually ignored? It looks to me like it sets the MTD
> > name. See the comments in include/linux/spi/flash.h and
> > arch/arm/include/asm/mach/flash.h (BTW, why do we have two definitions
> > for this??):
> >
> > @name: optional flash device name (eg, as used with mtdparts=)
> >
> > And I think it's used for exactly that in m25p80.c:
> >
> > if (data && data->name)
> > flash->mtd.name = data->name;
>
> And very few lines later in the m25p80.c you have this:
> if (data && data->type)
> id = spi_nor_match_id(data->type);
How is that relevant to the value of 'flash->mtd.name'?
> Code I touched in my patch was using both: name and type. So what you
> got it "type" took a precedence and "name" value was ignored. It seems
> like ppl used to use "name" to trigger "m25p80" probe, which isn't
> needed (it's done by SPI layer).
>
> Also see my comment about data->type usage I added in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id2f1b7c8352fd33d41bcec3cfb054ccdcfd40a42
But I'm not talking about probing / driver matching. The 'name' field is
used for assigning the MTD name deterministically. This name is used for
things like 'mtdparts'.
Brian
WARNING: multiple messages have this Message-ID (diff)
From: computersforpeace@gmail.com (Brian Norris)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: don't set unused name in struct flash_platform_data
Date: Tue, 21 Oct 2014 23:10:57 -0700 [thread overview]
Message-ID: <20141022061057.GC16128@brian-ubuntu> (raw)
In-Reply-To: <CACna6rw8dG4+nBkgNb+A_xfom=4rjh-nXJGeQ=4GgWHcZMJwMA@mail.gmail.com>
On Wed, Oct 22, 2014 at 08:03:45AM +0200, Rafa? Mi?ecki wrote:
> On 22 October 2014 07:53, Brian Norris <computersforpeace@gmail.com> wrote:
> > On Mon, Sep 29, 2014 at 02:30:53PM +0200, Rafa? Mi?ecki wrote:
> >> Loading correct SPI driver (m25p80) is handled using modalias from the
> >> struct spi_board_info. There is no point of setting name in the
> >> platform_data, m25p80 ignores it anyway.
> >
> > Wait, is 'name' actually ignored? It looks to me like it sets the MTD
> > name. See the comments in include/linux/spi/flash.h and
> > arch/arm/include/asm/mach/flash.h (BTW, why do we have two definitions
> > for this??):
> >
> > @name: optional flash device name (eg, as used with mtdparts=)
> >
> > And I think it's used for exactly that in m25p80.c:
> >
> > if (data && data->name)
> > flash->mtd.name = data->name;
>
> And very few lines later in the m25p80.c you have this:
> if (data && data->type)
> id = spi_nor_match_id(data->type);
How is that relevant to the value of 'flash->mtd.name'?
> Code I touched in my patch was using both: name and type. So what you
> got it "type" took a precedence and "name" value was ignored. It seems
> like ppl used to use "name" to trigger "m25p80" probe, which isn't
> needed (it's done by SPI layer).
>
> Also see my comment about data->type usage I added in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=32f1b7c8352fd33d41bcec3cfb054ccdcfd40a42
But I'm not talking about probing / driver matching. The 'name' field is
used for assigning the MTD name deterministically. This name is used for
things like 'mtdparts'.
Brian
next prev parent reply other threads:[~2014-10-22 6:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 12:30 [PATCH] ARM: don't set unused name in struct flash_platform_data Rafał Miłecki
2014-09-29 12:30 ` Rafał Miłecki
2014-09-29 12:30 ` Rafał Miłecki
2014-09-30 2:21 ` Simon Horman
2014-09-30 2:21 ` Simon Horman
2014-09-30 2:21 ` Simon Horman
2014-10-22 5:53 ` Brian Norris
2014-10-22 5:53 ` Brian Norris
2014-10-22 5:53 ` Brian Norris
2014-10-22 6:03 ` Rafał Miłecki
2014-10-22 6:03 ` Rafał Miłecki
2014-10-22 6:03 ` Rafał Miłecki
2014-10-22 6:10 ` Brian Norris [this message]
2014-10-22 6:10 ` Brian Norris
2014-10-22 6:10 ` Brian Norris
2014-10-22 6:11 ` Rafał Miłecki
2014-10-22 6:11 ` Rafał Miłecki
2014-10-22 6:11 ` Rafał Miłecki
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=20141022061057.GC16128@brian-ubuntu \
--to=computersforpeace@gmail.com \
--cc=horms@verge.net.au \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mcuos.com@gmail.com \
--cc=nsekhar@ti.com \
--cc=zajec5@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.