From patchwork Tue Oct 13 13:01:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 54848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id AA86020490 for ; Tue, 13 Oct 2015 13:02:41 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf9127746lbw.0 for ; Tue, 13 Oct 2015 06:02:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:cc:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=ZCMwlEccVrYTOFqZeWoF5k9K8SE/KuA79/m3scThnok=; b=P3yVZ50uDBnJyAzKLzk5ZSQj7nkzYHVmctXPlOC1OoqRGAb4QP4RybD4L4rOzdk8Ft B807w5XFSXigMBfr8kDQ6J9AVy+K5i8G4my196ZQOcXX6PoTlVZSA5uhSIPHN3MXx7ap 4s5LlnJj+JiGZfiSCMNMT8kB7J5utl8yJ39Mfsss7pLOUycHYZx5DUZyg5g2Didf+K2K LO/wfIBnFxTKNQCVyIFfFpYJQCxby23AoajveI61fMxb/GUyeABLKzyMZrekmlABF8fE 8SDJWSLUjTZJYVdcER5l45luCnCR8X64XBPN6tawdzpnVcKxPiDyHyZXu2nTEAqp4WcF Gdkg== X-Gm-Message-State: ALoCoQlgwJ+F5gF1O300jk5KOfWu/NSev8MoHb6LQU8a4eeLLb2foJ0gj1QL1kdYUuNI4AlP0bTu X-Received: by 10.180.10.135 with SMTP id i7mr4223928wib.2.1444741360582; Tue, 13 Oct 2015 06:02:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.18.90 with SMTP id h87ls370693lfi.9.gmail; Tue, 13 Oct 2015 06:02:40 -0700 (PDT) X-Received: by 10.25.157.131 with SMTP id g125mr9717485lfe.75.1444741360402; Tue, 13 Oct 2015 06:02:40 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id 100si2126528lft.42.2015.10.13.06.02.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 06:02:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbwr8 with SMTP id r8so18902445lbw.2 for ; Tue, 13 Oct 2015 06:02:40 -0700 (PDT) X-Received: by 10.112.163.131 with SMTP id yi3mr14922931lbb.36.1444741359871; Tue, 13 Oct 2015 06:02:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2118316lbq; Tue, 13 Oct 2015 06:02:38 -0700 (PDT) X-Received: by 10.66.141.165 with SMTP id rp5mr40078459pab.127.1444741358642; Tue, 13 Oct 2015 06:02:38 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id hx4si4997676pac.153.2015.10.13.06.02.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 06:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZlzCr-0004gN-Su; Tue, 13 Oct 2015 13:01:29 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZlzCo-00043p-PK for linux-arm-kernel@lists.infradead.org; Tue, 13 Oct 2015 13:01:27 +0000 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.122]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id t9DD13Wr015644; Tue, 13 Oct 2015 14:01:03 +0100 (BST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 0C9701AE0F9B; Tue, 13 Oct 2015 14:01:07 +0100 (BST) From: Will Deacon To: catalin.marinas@arm.com Subject: [PATCH] arm64: kasan: fix issues reported by sparse Date: Tue, 13 Oct 2015 14:01:06 +0100 Message-Id: <1444741266-21335-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151013_060127_186893_EC53A738 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: ryabinin.a.a@gmail.com, Will Deacon , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.deacon@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Sparse reports some new issues introduced by the kasan patches: arch/arm64/mm/kasan_init.c:91:13: warning: no previous prototype for 'kasan_early_init' [-Wmissing-prototypes] void __init kasan_early_init(void) ^ arch/arm64/mm/kasan_init.c:91:13: warning: symbol 'kasan_early_init' was not declared. Should it be static? [sparse] This patch resolves the problem by adding a prototype for kasan_early_init and marking the function as asmlinkage, since it's only called from head.S. Signed-off-by: Will Deacon Acked-by: Andrey Ryabinin --- arch/arm64/include/asm/kasan.h | 2 ++ arch/arm64/mm/kasan_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/kasan.h b/arch/arm64/include/asm/kasan.h index 71dfe14acdca..2774fa384c47 100644 --- a/arch/arm64/include/asm/kasan.h +++ b/arch/arm64/include/asm/kasan.h @@ -5,6 +5,7 @@ #ifdef CONFIG_KASAN +#include #include /* @@ -27,6 +28,7 @@ #define KASAN_SHADOW_OFFSET (KASAN_SHADOW_END - (1ULL << (64 - 3))) void kasan_init(void); +asmlinkage void kasan_early_init(void); #else static inline void kasan_init(void) { } diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c index b6a92f5dd568..cf038c7d9fa9 100644 --- a/arch/arm64/mm/kasan_init.c +++ b/arch/arm64/mm/kasan_init.c @@ -88,7 +88,7 @@ static void __init kasan_map_early_shadow(void) } while (pgd++, addr = next, addr != end); } -void __init kasan_early_init(void) +asmlinkage void __init kasan_early_init(void) { BUILD_BUG_ON(KASAN_SHADOW_OFFSET != KASAN_SHADOW_END - (1UL << 61)); BUILD_BUG_ON(!IS_ALIGNED(KASAN_SHADOW_START, PGDIR_SIZE));