Hi Ben, Em Mon, 04 Nov 2013 04:03:10 +0000 Ben Hutchings <ben@xxxxxxxxxxxxxxx> escreveu: > On Sat, 2013-11-02 at 11:31 -0200, Mauro Carvalho Chehab wrote: > > On cris and frv archs, the functions below aren't defined: > > drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_read': > > drivers/media/platform/sh_veu.c:228:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] > > drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_write': > > drivers/media/platform/sh_veu.c:234:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] > > drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read': > > drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] > > drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write': > > drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] > > drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read': > > drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] > > drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write': > > drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] > > drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_setup': > > drivers/media/platform/soc_camera/rcar_vin.c:284:3: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] > > drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_request_capture_stop': > > drivers/media/platform/soc_camera/rcar_vin.c:353:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] > > > > While this is not fixed, remove those 3 drivers from building on > > those archs. > [...] > > Well where does this stop? There will be many other drivers that are > broken if those functions are missing, and there's going to be a lot of > churn if we disable them all and then reenable when the architecture > headers are fixed. > > cris selects the generic implementations (CONFIG_GENERIC_IOMAP) but I > think arch/cris/include/asm/io.h is missing > #include <asm-generic/iomap.h>. Thanks for your review! Yes, adding it is enough to get rid of the errors on cris. > frv defines these functions inline in arch/frv/include/asm/io.h so I > don't know what the problem is there. One of the drivers weren't including <linux/io.h>. Probably, this were indirectly included on other archs. That's why it failed only on frv. The enclosed patch should fix for both: platform drivers: Fix build on cris and frv archs On cris and frv archs, compilation fails due to the lack of ioread32/iowrite32: drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_read': drivers/media/platform/sh_veu.c:228:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_write': drivers/media/platform/sh_veu.c:234:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read': drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write': drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read': drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write': drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_setup': drivers/media/platform/soc_camera/rcar_vin.c:284:3: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration] drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_request_capture_stop': drivers/media/platform/soc_camera/rcar_vin.c:353:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration] On cris, the reason is because asm-generic/iomap.h is not included on asm/io.h. On frv, the reason is because linux/io.h is not included on rcar_vin.c. Fix both issues. Signed-off-by: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx> PS.: I'll split this patch on two separate ones, sending the cris patch to the arch maintainer, and committing the media patch via my tree. diff --git a/arch/cris/include/asm/io.h b/arch/cris/include/asm/io.h index 5d3047e5563b..4353cf239a13 100644 --- a/arch/cris/include/asm/io.h +++ b/arch/cris/include/asm/io.h @@ -3,6 +3,7 @@ #include <asm/page.h> /* for __va, __pa */ #include <arch/io.h> +#include <asm-generic/iomap.h> #include <linux/kernel.h> struct cris_io_operations diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index b21f777f55e7..ddf648fab63f 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -14,6 +14,7 @@ * option) any later version. */ +#include <linux/io.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kernel.h>
Attachment:
signature.asc
Description: PGP signature