Message ID | 20170301225050.1298349-2-arnd@arndb.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E89F6604DC for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 1 Mar 2017 22:59:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D89DB284F7 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 1 Mar 2017 22:59:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCEFB28518; Wed, 1 Mar 2017 22:59:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8ED17284F7 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 1 Mar 2017 22:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bOnSbCrxKrLVVEvlQYUOsZWRTAIwoCYoH1eXKw7f+b4=; b=LcNxPUO9Mz4vw/LNfjE9BLVfcW 5s4cYIyr0WVgHgXsbwzWAPw0KxASLv2DKelIqveG7WYEXTlPS1Icr+DKQZSN+job8dUKFs7jwEyBK X9VG68wMjf/H9yBtnwnzuuVAnjNviINmUT/4L2Sz27LAU9IzhxnrpvneeTzYYdZ2GH397GmUDrdg3 d7V4n20TAC+dvjGV6Ly8cHlAaNVWXpOXTcDRgFL7rWNRg8/WSOkSRilvMANvfr8WGzaonflURCD13 DSmA6MaCKw0sosbQbhV5ni0w2P3D3ahPgMcUHiQ/BVfp2x5URRlRRYesmu+qm+aq1nA7m4sFxbfvT Zn+HdwXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cjDDg-0002Rv-Pt; Wed, 01 Mar 2017 22:59:40 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjDDc-0002NW-I0; Wed, 01 Mar 2017 22:59:38 +0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LpeUg-1c45eB2pio-00fPcX; Wed, 01 Mar 2017 23:51:37 +0100 From: Arnd Bergmann <arnd@arndb.de> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH 2/2] staging/vc04_services: add CONFIG_OF dependency Date: Wed, 1 Mar 2017 23:50:19 +0100 Message-Id: <20170301225050.1298349-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170301225050.1298349-1-arnd@arndb.de> References: <20170301225050.1298349-1-arnd@arndb.de> X-Provags-ID: V03:K0:+cOOijhWcPupTR2Nsn0N7dnomEABYm9HcCGNHKo9OwN8vKR/pf8 i5aSoQawiirt4oRs5wNoWfwODi8vXQxyzdbm5AmDGjD2XFVr1wMwlt8A9T2Qjxon3kP7yee Bqb0AaZWMnNiC626EhzUadQMhBylCBgdlhDGInTiMMbZL/vLVWOm5AqTW1Ino+0wyWAfiYP 41ZN/HrJgUg4v4Vv9DHwA== X-UI-Out-Filterresults: notjunk:1; V01:K0:w17WhCTfDFs=:L351EKTqB2nBilDXkS/gJW rrLdrE71WQFQClYJgWN0jVz2z04t1hWsIrWaR6gOUdKn2Z8MGFlPIerzejN/oHtVEpd0Awkd9 bWVXMw/C1mHvDGvS4zJ+k3+vCsVMdT+X25/0qyn78P6NRmLUBkkrIYo6uZ1EvsmgqT1pNY4cT egbfdRleCzcE8jGlbDYGSpzL9L9p0y7b4ISloWuBLaFZ1169kO9nSDkMWdp9eFOJyODFdb5Rg oHsUrW5AFsbOJKRW0hjPwOdPHAckoYzoDb8fCZAxpOy6W5oxIfZHRsyuJE0qVAwmyE6crfO8c NLFw1sY0g9mJXwlTM4j9CSCYGQtcQaSVjkyaGdzvqG6J1pbbZncNCXoE8yH2fUNym8lITpEyg aF8YSYV3e027RbxarT2OrR6bry+dUUFPG+th5gNZKEY3mLacIvokD53Sj+cpECPVJPrGkdR74 M8UgR5tnWFxGd13d7AI4Rhr95cdA97I35XQlEAq/+0tv3nZBP6CT2tBeIQewCwWhHsGtP4eqZ cDyL8eDnCeJnx++IVzbJoYgc9qxzhiowsheRrTy5upiRQhl6SF8OfRIjvPUdOvwTBj0dmKil3 5A+X3FiJQGK3Zyho5VFbpQJxKDsGRgz+Nn+O2rk2/tsmA8CLrV2wJBhSLHIrivN5g16bLzoDh Bq5Z4XCXMSHRPrE5lLOV00fp988ezW5kbi+k7LAbMUgOcAM6B+YenQqIMnCAUPsQS3Pc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170301_145936_952807_C6629515 X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Stefan Wahren <stefan.wahren@i2se.com>, devel@driverdev.osuosl.org, Daniel Stone <daniels@collabora.com>, Arnd Bergmann <arnd@arndb.de>, Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>, linux-kernel@vger.kernel.org, Eric Anholt <eric@anholt.net>, =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>, linux-rpi-kernel@lists.infradead.org, popcornmix <popcornmix@gmail.com>, Colin Ian King <colin.king@canonical.com>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/staging/vc04_services/Kconfig b/drivers/staging/vc04_services/Kconfig index e61e4ca064a8..74094fff4367 100644 --- a/drivers/staging/vc04_services/Kconfig +++ b/drivers/staging/vc04_services/Kconfig @@ -1,6 +1,7 @@ config BCM2835_VCHIQ tristate "Videocore VCHIQ" depends on HAS_DMA + depends on OF depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE) default y help
After several hours of debugging this obviously bogus but elaborate gcc-7.0.1 warning, drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'vchiq_complete_bulk': drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:603:4: error: argument 2 null where non-null expected [-Werror=nonnull] memcpy((char *)page_address(pages[0]) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pagelist->offset, ~~~~~~~~~~~~~~~~~ fragments, ~~~~~~~~~~ head_bytes); ~~~~~~~~~~~ In file included from include/linux/string.h:18:0, from include/linux/bitmap.h:8, from include/linux/cpumask.h:11, from include/linux/interrupt.h:9, from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:37: arch/arm/include/asm/string.h:16:15: note: in a call to function 'memcpy' declared here extern void * memcpy(void *, const void *, __kernel_size_t) __nocapture(2); ^~~~~~ I have concluded that gcc was technically right in the first place: vchiq_complete_bulk is an externally visible function that calls free_pagelist(), which in turn derives a pointer from the global g_fragments_base variable. g_fragments_base is initialized in vchiq_platform_init(), but we only get there if of_property_read_u32() successfully reads the cache line size. When CONFIG_OF is disabled, this always fails, and g_fragments_base is guaranteed to be NULL when vchiq_complete_bulk() gets called. This adds a CONFIG_OF Kconfig dependency, which is also technically correct but nonobvious, and thus seems like a good fit for the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/staging/vc04_services/Kconfig | 1 + 1 file changed, 1 insertion(+)