From patchwork Mon Nov 4 11:28:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3135281 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B3530BEEB2 for ; Mon, 4 Nov 2013 11:28:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0F33202F2 for ; Mon, 4 Nov 2013 11:28:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF891204D8 for ; Mon, 4 Nov 2013 11:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583Ab3KDL2T (ORCPT ); Mon, 4 Nov 2013 06:28:19 -0500 Received: from mailout4.w2.samsung.com ([211.189.100.14]:64140 "EHLO usmailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789Ab3KDL2S (ORCPT ); Mon, 4 Nov 2013 06:28:18 -0500 Received: from uscpsbgm1.samsung.com (u114.gpu85.samsung.co.kr [203.254.195.114]) by usmailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MVQ0043TL6K4W40@usmailout4.samsung.com>; Mon, 04 Nov 2013 06:28:16 -0500 (EST) X-AuditID: cbfec372-b7fe76d000003347-68-527784d08920 Received: from ussync3.samsung.com ( [203.254.195.83]) by uscpsbgm1.samsung.com (USCPMTA) with SMTP id 2A.EA.13127.0D487725; Mon, 04 Nov 2013 06:28:16 -0500 (EST) Received: from localhost.localdomain ([105.144.34.15]) by ussync3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MVQ002VIL71I560@ussync3.samsung.com>; Mon, 04 Nov 2013 06:28:16 -0500 (EST) Date: Mon, 04 Nov 2013 09:28:02 -0200 From: Mauro Carvalho Chehab To: Ben Hutchings Cc: Linux Media Mailing List , Mauro Carvalho Chehab , stable@vger.kernel.org Subject: Re: [PATCHv2 07/29] platform drivers: Fix build on cris and frv archs Message-id: <20131104092802.49fce9e6@samsung.com> In-reply-to: <1383537790.2764.69.camel@deadeye.wl.decadent.org.uk> References: <1383399097-11615-1-git-send-email-m.chehab@samsung.com> <1383399097-11615-8-git-send-email-m.chehab@samsung.com> <1383537790.2764.69.camel@deadeye.wl.decadent.org.uk> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) MIME-version: 1.0 Content-type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/MmNQ2nsMm5FhJ+c_WYBqITg"; protocol="application/pgp-signature" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsVy+t/hYN0LLeVBBjcfW1gsmHaR0aJnw1ZW ix2nFjFbLNj4iNGBxePCsWtMHptXaHl83iQXwBzFZZOSmpNZllqkb5fAlbHg9TWmgvkWFV0X sxoYnxt0MXJySAiYSPz8OosFwhaTuHBvPVsXIxeHkMASRonTt14xQTg9TBKb+naygVSxCKhK LLp/nQnEZhMwknjV2MIKYosIqEss+/WMHaSBWaCZUeLKyz3MIAlhAT+JC38XgK3gFTCUeNDU wAhicwo4SUzrns4OsWE7o8SsK/1ARRxAdzhJ7D4gBVEvKPFj8j0WiKENjBKntm1hnsDIPwtJ bhayHEiCWUBL4uGvWywQtrbEsoWvoeLWEtdvHIWyzSVWrZnJvICRbRWjaGlxckFxUnquoV5x Ym5xaV66XnJ+7iZGSJgX7WB8tsHqEKMAB6MSD2/h1bIgIdbEsuLK3EOMKkBzHm1YfYFRiiUv Py9VSYR3RVF5kBBvSmJlVWpRfnxRaU5q8SFGJg5OqQZGp3uTX/8JkXzbfc6zuP1T5QJNeQ2h PK66Jol3599Gqhns/HrxW4aFO2/B9Vf3WM9t8jm59yHHKYkMV6djO2R3H9t2IO7CxjMelrdv 7/4ac+7CV2OmyYXbfLdP/3ytx3jO6m9NVZN32K4zXHnw7Pcp2ckbzK49FHZ9rCx9RnvH7W3s 90sfzHjN/ESJpTgj0VCLuag4EQAw3o5kXQIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Ben, Em Mon, 04 Nov 2013 04:03:10 +0000 Ben Hutchings 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 . 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 . 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 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 /* for __va, __pa */ #include +#include #include 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 #include #include #include