From patchwork Tue May 16 15:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13243322 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04F10C77B75 for ; Tue, 16 May 2023 15:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NjYgCYKYnp0QCsoK8o0wy90HUo1WJqaO4LA0imzOVyU=; b=p3AbK+mTe+7ClB 9FI5w9JQfb+wEw+oQfncw9gh5oe7o5UCft3ZmvIFU35XWmPqV9Any1gDI0n8D1jBcXp3FBBI7w0Zy 3V7j6OaK6yDPMV9o1GZ8ZBJlqng5+h2+CHjdYJi33kla6gk8bMp1TApsg9bv5HliC2lP48250pod8 hWn19PW4I0B+vve5yVdToqAapBArdhErz5J6JWn17n8Ns4c9Z+PXw+nmynBlfHnUMkuVtwa0Vkua8 4wsQRnxZU9wNw6Pka3rP/zLk+AlJtDiA/9FTm6ucVl/tlvr/TSvFQU2WJgG5RhLTdPw0bFK7St2tO W9hLUbYr66nrBlyfwk1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pywsc-006JRK-0M; Tue, 16 May 2023 15:46:26 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pywsX-006JP6-0x for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 15:46:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CFF7E63B7D; Tue, 16 May 2023 15:46:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0851EC433A0; Tue, 16 May 2023 15:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251980; bh=RmbFIhpMNElq8ZkpNfEGRuhnV3uNnxxGxG17h/UHJGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=atImyQCL9jgkPIb7HW0By+bWCRzkUSWQ8RVamtL4cFJzOUPUmO+faoEujXoK+Si5a zx2WlozINWvxSz+xwAglfp8G2uB9FBan4qsDVnAWPBUU1vD+GoUszoNWjHVLtiVcPZ UujkQhv8ULrWuc2TGKi16vpgj2Qq+iUlbtprJqAH/3/j1+uc26xynSbh5cU035CW+I cFfcdAfxPiJuLxjgiKfthyG2t8VGJX//4ONUV6834gMa0UYqdWF9H8tVGctW3+O3kz WNOxNYFvjg+BA+yjighlvpQOozjJF4UwCQM7YuQ1RIqh4yYcXfA7sB0hFK3lHZAjVr nPQW6GxUJD41w== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 01/16] ARM: dma-mapping: hide unused dma_contiguous_early_fixup function Date: Tue, 16 May 2023 17:45:50 +0200 Message-Id: <20230516154605.517690-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_084621_474136_212E08CF X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann The dma_contiguous_early_fixup() function is a global __weak stub with an arm specific override, but the declaration is in an #ifdef. If CONFIG_DMA_CMA is disabled, there is no caller and no prototype, which adds a warning for the definition: arm/mm/dma-mapping.c:261:13: error: no previous prototype for 'dma_contiguous_early_fixup' [-Werror=missing-prototypes] Enclose the definition in the same #ifdef as the prototype to avoid that and save a few bytes of .init.text. Signed-off-by: Arnd Bergmann --- arch/arm/mm/dma-mapping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index b4a33358d2e9..bc4ed5ce3e00 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -258,12 +258,14 @@ static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata; static int dma_mmu_remap_num __initdata; +#ifdef CONFIG_DMA_CMA void __init dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) { dma_mmu_remap[dma_mmu_remap_num].base = base; dma_mmu_remap[dma_mmu_remap_num].size = size; dma_mmu_remap_num++; } +#endif void __init dma_contiguous_remap(void) {