Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246439 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2015-10-14 11:10 +0200 |
| Last post | 2015-10-14 18:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-14 11:10 +0200
Re: [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS Brian Norris <computersforpeace@gmail.com> - 2015-10-14 18:30 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2015-10-14 11:10 +0200 |
| Subject | [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS |
| Message-ID | <qjqen-2hl-33@gated-at.bofh.it> |
The bcm47xxsflash driver uses the KSEG0ADDR() function to map an address to a certain kernel segment. But that is only defined if the MIPS config symbol is enabled. The driver does not have an explicit dependency on it and relies on a transitive dependency relation: MTD_BCM47XXSFLASH -> BCMA_SFLASH -> BCMA_DRIVER_MIPS -> BCMA && MIPS But BCMA_SFLASH and BCMA_DRIVER_MIPS have only runtime and not buildtime dependency with MIPS so can be changed to be built test using the config COMPILE_TEST symbol. But that would make MTD_BCM47XXSFLASH be built with MIPS not enabled and cause the following build error: drivers/mtd/devices//bcm47xxsflash.c: In function 'bcm47xxsflash_read': drivers/mtd/devices//bcm47xxsflash.c:112:2: error: implicit declaration of function 'KSEG0ADDR' [-Werror=implicit-function-declaration] memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from), ^ Make MTD_BCM47XXSFLASH depend on MIPS since has a buildtime dependency. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> --- drivers/mtd/devices/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index f73c41697a00..f5eab3c19356 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -114,7 +114,7 @@ config MTD_SST25L config MTD_BCM47XXSFLASH tristate "R/O support for serial flash on BCMA bus" - depends on BCMA_SFLASH + depends on BCMA_SFLASH && MIPS help BCMA bus can have various flash memories attached, they are registered by bcma as platform devices. This enables driver for -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Brian Norris <computersforpeace@gmail.com> |
|---|---|
| Date | 2015-10-14 18:30 +0200 |
| Message-ID | <qjx6b-3XF-27@gated-at.bofh.it> |
| In reply to | #1246439 |
+ RafaĆ On Wed, Oct 14, 2015 at 11:04:54AM +0200, Javier Martinez Canillas wrote: > The bcm47xxsflash driver uses the KSEG0ADDR() function to map an address > to a certain kernel segment. But that is only defined if the MIPS config > symbol is enabled. The driver does not have an explicit dependency on it > and relies on a transitive dependency relation: > > MTD_BCM47XXSFLASH -> BCMA_SFLASH -> BCMA_DRIVER_MIPS -> BCMA && MIPS > > But BCMA_SFLASH and BCMA_DRIVER_MIPS have only runtime and not buildtime > dependency with MIPS so can be changed to be built test using the config > COMPILE_TEST symbol. But that would make MTD_BCM47XXSFLASH be built with > MIPS not enabled and cause the following build error: > > drivers/mtd/devices//bcm47xxsflash.c: In function 'bcm47xxsflash_read': > drivers/mtd/devices//bcm47xxsflash.c:112:2: error: implicit declaration of function 'KSEG0ADDR' [-Werror=implicit-function-declaration] > memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from), > ^ > > Make MTD_BCM47XXSFLASH depend on MIPS since has a buildtime dependency. > > Reported-by: Fengguang Wu <fengguang.wu@intel.com> > Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> > > --- > > drivers/mtd/devices/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig > index f73c41697a00..f5eab3c19356 100644 > --- a/drivers/mtd/devices/Kconfig > +++ b/drivers/mtd/devices/Kconfig > @@ -114,7 +114,7 @@ config MTD_SST25L > > config MTD_BCM47XXSFLASH > tristate "R/O support for serial flash on BCMA bus" > - depends on BCMA_SFLASH > + depends on BCMA_SFLASH && MIPS > help > BCMA bus can have various flash memories attached, they are > registered by bcma as platform devices. This enables driver for > -- > 2.4.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web