linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
@ 2015-11-26  8:05 Rafał Miłecki
  2015-11-27  9:25 ` Rafał Miłecki
  2015-11-30 20:02 ` Brian Norris
  0 siblings, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2015-11-26  8:05 UTC (permalink / raw)
  To: Brian Norris, linux-mtd; +Cc: Rafał Miłecki

So far struct spi_nor was using just a pointer to struct mtd_info so it
wasn't needed to have it fully defined there. After recent change we
embed whole struct so we need to include a proper header.

Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 include/linux/mtd/spi-nor.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 7bed974..fac3f6f 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -12,6 +12,7 @@
 
 #include <linux/bitops.h>
 #include <linux/mtd/cfi.h>
+#include <linux/mtd/mtd.h>
 
 /*
  * Manufacturer IDs
@@ -117,8 +118,6 @@ enum spi_nor_option_flags {
 	SNOR_F_USE_FSR		= BIT(0),
 };
 
-struct mtd_info;
-
 /**
  * struct spi_nor - Structure for defining a the SPI NOR layer
  * @mtd:		point to a mtd_info structure
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
  2015-11-26  8:05 [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition Rafał Miłecki
@ 2015-11-27  9:25 ` Rafał Miłecki
  2015-11-27 22:33   ` Brian Norris
  2015-11-30 20:02 ` Brian Norris
  1 sibling, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2015-11-27  9:25 UTC (permalink / raw)
  To: Brian Norris, linux-mtd@lists.infradead.org

On 26 November 2015 at 09:05, Rafał Miłecki <zajec5@gmail.com> wrote:
> So far struct spi_nor was using just a pointer to struct mtd_info so it
> wasn't needed to have it fully defined there. After recent change we
> embed whole struct so we need to include a proper header.
>
> Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

This may be worth taking as a fix for 4.4. However I'm not aware of
any upstream driver failing to build because of this.

-- 
Rafał

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
  2015-11-27  9:25 ` Rafał Miłecki
@ 2015-11-27 22:33   ` Brian Norris
  2015-11-28 14:05     ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Norris @ 2015-11-27 22:33 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-mtd@lists.infradead.org, linux-kernel, stable

On Fri, Nov 27, 2015 at 10:25:55AM +0100, Rafał Miłecki wrote:
> On 26 November 2015 at 09:05, Rafał Miłecki <zajec5@gmail.com> wrote:
> > So far struct spi_nor was using just a pointer to struct mtd_info so it
> > wasn't needed to have it fully defined there. After recent change we
> > embed whole struct so we need to include a proper header.

Good catch.

> > Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")

I'm not 100% sure, but I thought I recall the -stable folks picking up
for-linus commits just based on the 'Fixes:' tags. I feel like that
isn't always ideal, though.

> > Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> 
> This may be worth taking as a fix for 4.4. However I'm not aware of
> any upstream driver failing to build because of this.

I don't see why it would need rushed out. All users of spi-nor.h
currently include mtd.h first. So there are no build failures because of
it.

Regards,
Brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
  2015-11-27 22:33   ` Brian Norris
@ 2015-11-28 14:05     ` Rafał Miłecki
  2015-11-30 19:42       ` Brian Norris
  0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2015-11-28 14:05 UTC (permalink / raw)
  To: Brian Norris
  Cc: linux-mtd@lists.infradead.org, Linux Kernel Mailing List, Stable

On 27 November 2015 at 23:33, Brian Norris <computersforpeace@gmail.com> wrote:
> On Fri, Nov 27, 2015 at 10:25:55AM +0100, Rafał Miłecki wrote:
>> On 26 November 2015 at 09:05, Rafał Miłecki <zajec5@gmail.com> wrote:
>> > Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
>
> I'm not 100% sure, but I thought I recall the -stable folks picking up
> for-linus commits just based on the 'Fixes:' tags. I feel like that
> isn't always ideal, though.

I'm confused. Do you mean I shouldn't include it?
Do you have a reference to more detailed Fixes usage? All I found is
info in Documentation/SubmittingPatches:
> If your patch fixes a bug in a specific commit, e.g. you found an issue using
> git-bisect, please use the 'Fixes:' tag
I think 'Fixes' usage is OK in this case.


>> > Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>
>> This may be worth taking as a fix for 4.4. However I'm not aware of
>> any upstream driver failing to build because of this.
>
> I don't see why it would need rushed out. All users of spi-nor.h
> currently include mtd.h first. So there are no build failures because of
> it.

OK. It was just an OpenWrt out-of-tree driver that failed to compile.

-- 
Rafał

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
  2015-11-28 14:05     ` Rafał Miłecki
@ 2015-11-30 19:42       ` Brian Norris
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Norris @ 2015-11-30 19:42 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-mtd@lists.infradead.org, Linux Kernel Mailing List, Stable

On Sat, Nov 28, 2015 at 03:05:26PM +0100, Rafał Miłecki wrote:
> On 27 November 2015 at 23:33, Brian Norris <computersforpeace@gmail.com> wrote:
> > On Fri, Nov 27, 2015 at 10:25:55AM +0100, Rafał Miłecki wrote:
> >> On 26 November 2015 at 09:05, Rafał Miłecki <zajec5@gmail.com> wrote:
> >> > Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
> >
> > I'm not 100% sure, but I thought I recall the -stable folks picking up
> > for-linus commits just based on the 'Fixes:' tags. I feel like that
> > isn't always ideal, though.
> 
> I'm confused. Do you mean I shouldn't include it?

No, the 'Fixes' usage is fine. I'm just not clear what importance is
placed on it by others.

> Do you have a reference to more detailed Fixes usage? All I found is
> info in Documentation/SubmittingPatches:
> > If your patch fixes a bug in a specific commit, e.g. you found an issue using
> > git-bisect, please use the 'Fixes:' tag
> I think 'Fixes' usage is OK in this case.

I don't have any better reference. Perhaps I'm completely mistaken, and
'Fixes' is never taken as the sole source of for-stable annotation.

Brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition
  2015-11-26  8:05 [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition Rafał Miłecki
  2015-11-27  9:25 ` Rafał Miłecki
@ 2015-11-30 20:02 ` Brian Norris
  1 sibling, 0 replies; 6+ messages in thread
From: Brian Norris @ 2015-11-30 20:02 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-mtd

On Thu, Nov 26, 2015 at 09:05:04AM +0100, Rafał Miłecki wrote:
> So far struct spi_nor was using just a pointer to struct mtd_info so it
> wasn't needed to have it fully defined there. After recent change we
> embed whole struct so we need to include a proper header.
> 
> Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

Applied to l2-mtd.git

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-30 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26  8:05 [PATCH] mtd: spi-nor: include mtd.h header for struct mtd_info definition Rafał Miłecki
2015-11-27  9:25 ` Rafał Miłecki
2015-11-27 22:33   ` Brian Norris
2015-11-28 14:05     ` Rafał Miłecki
2015-11-30 19:42       ` Brian Norris
2015-11-30 20:02 ` Brian Norris

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).