From patchwork Wed Apr 3 08:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13615321 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 07794811E7; Wed, 3 Apr 2024 08:08:59 +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=1712131740; cv=none; b=su4or7BFfNunVlPjnRn8cpg12Tqq/Kp+/8KTvNkDhdVUiyCDva6pQ3mhLXFCKRQthL12SoIZLFMmjpxiOcvbS0Ak/23rE45WFVI98bfgoe8lYglRNWIsgMBx1DSyWaVdr1mxkKspMm4dnO099N5Zhr1F/vE35B1mMRwILC9GSBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131740; c=relaxed/simple; bh=X/fK2OdkpVR6C+bG/qhKxNGaMgR2KonaIsE01GrX9Sc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k+XZO/EjtZ57sm7oiO1yaUcAVODPnAItn85++q+teZb5WuoLPBv9V/sF+6IN8VANn1YO91DsCZVnCCeBTNoi4iUp4KgU02QYWNhg3uBLpHcXFvdvtufww2kAGrRssWdfLSR032SJyVeExI1SYizxAXtMzkg2kwlfHPWRyx4h2mA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RZOnfFaY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RZOnfFaY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 964C3C433F1; Wed, 3 Apr 2024 08:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131739; bh=X/fK2OdkpVR6C+bG/qhKxNGaMgR2KonaIsE01GrX9Sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZOnfFaYvyXiyoYAQRLlANr35Zpb67OxxhuxvGgxH0VrCHjq9jozy+tKcGwZ38wAI AmeGN6klOXqXVhxuwSBHvAB9iA5NUHd9rWmK0kdrgn5fh0o1NHHzxcc+uTgllGiWcO fiG660QKYGH6pb3EHVtygPAX39MWImnmPPVVRMuTOob3WxhwMc/zxAs++zzQ/cNSBb JQ/nCyXAqVcTpUiJPOLNEroGe4ynv08QPavclC9sOyG3JQ/LIv8AnMy7AXzJWFjRtv gDpEnzBZfmZyIyRQXqO5vD03+/sbIPmYkVh9yiagXSR4Y5oiY6ba4FUeiLVE5N4wUN x7ynm0mD+c8+g== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Sebastian Reichel , Anda-Maria Nicolae , Krzysztof Kozlowski Cc: Arnd Bergmann , David Lechner , Rob Herring , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org Subject: [PATCH 09/34] power: rt9455: hide unused rt9455_boost_voltage_values Date: Wed, 3 Apr 2024 10:06:27 +0200 Message-Id: <20240403080702.3509288-10-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-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann The rt9455_boost_voltage_values[] array is only used when USB PHY support is enabled, causing a W=1 warning otherwise: drivers/power/supply/rt9455_charger.c:200:18: error: 'rt9455_boost_voltage_values' defined but not used [-Werror=unused-const-variable=] Enclose the definition in the same #ifdef as the references to it. Fixes: e86d69dd786e ("power_supply: Add support for Richtek RT9455 battery charger") Signed-off-by: Arnd Bergmann --- drivers/power/supply/rt9455_charger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c index c345a77f9f78..e4dbacd50a43 100644 --- a/drivers/power/supply/rt9455_charger.c +++ b/drivers/power/supply/rt9455_charger.c @@ -192,6 +192,7 @@ static const int rt9455_voreg_values[] = { 4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000 }; +#if IS_ENABLED(CONFIG_USB_PHY) /* * When the charger is in boost mode, REG02[7:2] represent boost output * voltage. @@ -207,6 +208,7 @@ static const int rt9455_boost_voltage_values[] = { 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, }; +#endif /* REG07[3:0] (VMREG) in uV */ static const int rt9455_vmreg_values[] = { From patchwork Wed Apr 3 08:06:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13615322 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 CDC66130E57; Wed, 3 Apr 2024 08:11:41 +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=1712131901; cv=none; b=sp5Oipb80YDszH2ZRXtc0uh2Q9G0HwK01HDPt0zsQkP4xj9IwL0FuRhrJRkfn+dWhCvQQ6WN/w/gZ1bRTQ91ET9iwGAZhM8TS9rAvkynGPDmJK6RSvWBCABWtfv7M6J6wjEjakgKOL4uEAOfssh0LXnBsWFaIKhQ07EbbXiP/5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131901; c=relaxed/simple; bh=fyLsfheaYKd+miTluYtO6pZInxaScKj0VFWPZBAzIGU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I7prl7BFknCBKZz8DbSj/F5A912jKeYR9w7A+fLuDqpOHuJehT5rlpJhHEkjGJxyIJqx5LsprpnZ1ZCuzsS5u4IX7uEAj4byv1zZyfVUF0JmBM9My1wI4vr9U4OJFoCuLQ7TuI7P/BCr1RZHXVDeaSQCIfCcgQN0A3WMPjU9KDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=teWmzofe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="teWmzofe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50F61C43394; Wed, 3 Apr 2024 08:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131901; bh=fyLsfheaYKd+miTluYtO6pZInxaScKj0VFWPZBAzIGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=teWmzofeqXsUSch/4hPcGgnIlL6++wfUzQ/aMHOB3ZobnXVoCyIFMH8yWP4rzUokd xLHRM1L+/MiUYpL7DQQVPR7XkVbV9kMCMHnpy8Cj4l2xVWozoKXSLAqaTIxyEaMqVu EFPVTEOgbvbzyTUoXlUtlL7C8Jvaj1izyxbLpiQj6A4yxmINwf8iKC2T2wuvry1vtP nFZo0zH9L/02AafTcmX5QnfdGueRXcpp8f3zLVcl/76FdJzrZLyHvCvxC4z4AD6eqN eQO7QleLc9udoJHnA8A29Y3x99qUELYditqPz05YQO00SyZKqk+Ik07N3V6+qntm+i 5qGlasuqMK4Hw== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , Viresh Kumar Cc: Arnd Bergmann , Doug Smythies , Zhenguo Yao , Tero Kristo , "Jiri Slaby (SUSE)" , linux-pm@vger.kernel.org Subject: [PATCH 27/34] cpufreq: intel_pstate: hide unused intel_pstate_cpu_oob_ids[] Date: Wed, 3 Apr 2024 10:06:45 +0200 Message-Id: <20240403080702.3509288-28-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-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann The reference to this variable is hidden in an #ifdef: drivers/cpufreq/intel_pstate.c:2440:32: error: 'intel_pstate_cpu_oob_ids' defined but not used [-Werror=unused-const-variable=] Use the same check around the definition. Signed-off-by: Arnd Bergmann --- drivers/cpufreq/intel_pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index dbbf299f4219..29ce9edc6f68 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -2437,6 +2437,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { }; MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); +#ifdef CONFIG_ACPI static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = { X86_MATCH(BROADWELL_D, core_funcs), X86_MATCH(BROADWELL_X, core_funcs), @@ -2445,6 +2446,7 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = { X86_MATCH(SAPPHIRERAPIDS_X, core_funcs), {} }; +#endif static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = { X86_MATCH(KABYLAKE, core_funcs),