Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2558629lqz; Wed, 3 Apr 2024 01:19:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxRlrYOCPdOLP8si01m/VLT2q/liWTr71hoTqRpbu/JEkodtg9c3VhxD+567F+tCCmuiFMSHm2jldvbZwt+8+b1buOw/F39CIqLcBMwg== X-Google-Smtp-Source: AGHT+IFUTQkQluagT34/hNgIIEcecBSJPVJEnSpjx0p/3lMZUh+wYM8Xcclh1b61kQSzj8RuJMqe X-Received: by 2002:a17:906:b889:b0:a4e:101e:8a97 with SMTP id hb9-20020a170906b88900b00a4e101e8a97mr1260376ejb.65.1712132363942; Wed, 03 Apr 2024 01:19:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712132363; cv=pass; d=google.com; s=arc-20160816; b=yJYTHcOI+DaJ/zQcqw7uYjJIxaSSVl7p9t2XwgVJP9K5MDoaSHqpGqd9+OlJQC8lGu DAcAkgLhFMwR2na3AOZJh5Oxm1AX09jplsEdAZGAjTjVeiQnCtfjG3JtX7PUS9mM9LBQ BNPj8xdEKoj9G1VASSoX81vsiZxFK31GisD5/vjeA6spSKWHeC4b3qNvAPy31Wf/YfG/ nLMC6lIaxNrYjY5oXGld5CEfRuudx3RWK5hVvs6511eVaNC7lBAyz3sSaKjj85IXupEg BJEILnpfjxe5EMiqFzgVp2gZZOuWOWGsU53PnFSK85i+fANADEueSIXa/a3yXx9LVjZo taWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mHdcy+K2EMiUSfGO57nwGwql0XFcaq0O5r4o0+rjsKA=; fh=LWaYMxVqiFVdY5D4kBSPl3RCjOCsMoGZ9bEPZ5ldLTQ=; b=cLyE/ABHE1pItYMrvQZme0bpFmcYDtSPExtwP1dCrkGc9ODL+rnpWBj4G4oUPYMx+M ddHtFXALCD6G0K9A9ZwsgKSlaDwqfBjJprITnlG1XOh+2lICjLEtxTxCxnM2Pa/1zA7w rb5zH8bO46QFZxp+dlCiBWaBvhRy6Ph4ui3+4Ej0tpxJ8MU2lGxFxYZ8EzPDCBhJb+lL haUl5xvcsEcV6VKTJuXWW4q8BpTFPZrSe6sp5HxNj8dx7XOgtEs8BM4ePVLkMK9k4lh+ ysBBjLJtKtKLBAeI+Q+8Oaa4KUA1/4NhZWD64Tsh2BTs+4Olg93mUvu0FxwN7wPU/5S6 rbtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QrlzbiVz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129291-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q11-20020a1709066b0b00b00a4e4840c951si4564540ejr.434.2024.04.03.01.19.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 01:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129291-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QrlzbiVz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129291-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A74D01F214BD for ; Wed, 3 Apr 2024 08:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A160D1292C1; Wed, 3 Apr 2024 08:09:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QrlzbiVz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C70E98665A; Wed, 3 Apr 2024 08:09:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131782; cv=none; b=X5zNDYJCZEYQ0B6J4UoO71pfdzQLfDMYoQM35Gc33nxdvi+J7+Ks1RC2icT15tCWdRCgEQ+iDwjiIMv/FYkup2JFvXuAK7lnF4kDt59c5Q6LM0LdGZhSnPzKETsD7xAVjIEjeLnL+90LcH0/W+JDKgbBskQU82JYcuIMUJpabAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131782; c=relaxed/simple; bh=7qsqH0LOymzYXB4GWBeD5Wb7ADrWcz+eYFLQOtLMhn0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fohUacLglUdTTtHLaxI4JVEx+zPZzQzCmUWkpipUl7FtBGqY5eAo9MmrAQLJHBD6tfnL46pm3ywhSKQnPbL3HxQH4FmPqC1+8JoIwaOIkV/6UuwAnAIf9+6MuV5W/7ksZ7OBNW0YjmZ/4owjAjvZqaICrl3LHYHOFr1TgQyUWSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QrlzbiVz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3C06C433F1; Wed, 3 Apr 2024 08:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131782; bh=7qsqH0LOymzYXB4GWBeD5Wb7ADrWcz+eYFLQOtLMhn0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QrlzbiVz8QbmfIib4J3OYU4BOIrOjhCsy7HJjYd3nq1yYbaY+QP/p9/1g8S0EMgrW 9XdWtqndlfwLVhoRp2IULI0sKLRt1fHzqVhrBXG6/TW/3yvBf8ZIqMPEN5jteWUE7r f7Du+JzXpzdXLydduMpaARcakzrnsWpVk9HbLsEXOCSc1ORaEPo/dcrQ4+5MAUnbhm Cf7Fiiwa6icGeeYse5sLPeCUrnsevCa2UNW5BKkk0wFywIW6ib9G3d2A8k6KwxrLts Hv0FxdSYJaDXVcPRysoRQfkKQ7zDki7ab8oWVo0s7J7aONZamdGy2612a6usR1rHPD NIfIOouT+oi+g== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Christoph Hellwig , Marek Szyprowski , Arnd Bergmann , Kyungmin Park , Michal Nazarewicz Cc: Robin Murphy , Yajun Deng , Binglei Wang , Anshuman Khandual , Andrew Morton , Zhenhua Huang , iommu@lists.linux.dev Subject: [PATCH 14/34] dma/congiguous: avoid warning about unused size_bytes Date: Wed, 3 Apr 2024 10:06:32 +0200 Message-Id: <20240403080702.3509288-15-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann When building with W=1, this variable is unused for configs with CONFIG_CMA_SIZE_SEL_PERCENTAGE=y: kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=] Mark it as __maybe_unused to avoid the warning without adding more ifdef checks to this file. Fixes: c64be2bb1c6e ("drivers: add Contiguous Memory Allocator") Signed-off-by: Arnd Bergmann --- kernel/dma/contiguous.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index 055da410ac71..c53f4f633f7f 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -64,7 +64,7 @@ struct cma *dma_contiguous_default_area; * Users, who want to set the size of global CMA area for their system * should use cma= kernel parameter. */ -static const phys_addr_t size_bytes __initconst = +static const phys_addr_t size_bytes __initconst __maybe_unused = (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M; static phys_addr_t size_cmdline __initdata = -1; static phys_addr_t base_cmdline __initdata; -- 2.39.2