mtd: spi-nor: include mtd.h header for struct mtd_info definition
Subsystems (3)
PATCH 1/1 mtd: spi-nor: include mtd.h header for struct mtd_info definition
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.
--- include/linux/mtd/spi-nor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/mtd/spi-nor.h +1 -2
@@ -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
Signature · 1 line
1.8.4.5
Quoted 6 lines · Rafał Miłecki
So far struct
spi_norwas using just a pointer to structmtd_infoso 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 <[email protected]>
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.
Signature · 1 line
Rafał
Quoted 4 lines · Rafał Miłecki
Quoted 3 lines · Rafał Miłecki
So far struct
spi_norwas using just a pointer to structmtd_infoso 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.
Quoted 1 line
Quoted 1 line
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.
Quoted 4 lines
Quoted 1 line
Signed-off-by Rafał Miłecki <[email protected]>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
Quoted 7 lines · Brian Norris
Quoted 2 lines · Rafał Miłecki
Quoted 1 line · Rafał Miłecki
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:
Quoted 2 lines
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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Rafał Miłecki <[email protected]>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.hcurrently includemtd.hfirst. So there are no build failures because of it.
OK. It was just an OpenWrt out-of-tree driver that failed to compile.
Signature · 1 line
Rafał
Quoted 10 lines · Rafał Miłecki
Quoted 7 lines · Brian Norris
Quoted 2 lines · Rafał Miłecki
Quoted 1 line · Rafał Miłecki
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.
Quoted 5 lines
Do you have a reference to more detailed Fixes usage? All I found is info in
Documentation/SubmittingPatches:Quoted 2 lines
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
Brian Norris
AppliedQuoted 6 lines · Rafał Miłecki
So far struct
spi_norwas using just a pointer to structmtd_infoso 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 <[email protected]>
Applied to l2-mtd.git