From mboxrd@z Thu Jan 1 00:00:00 1970 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 6A4641C3BEB; Tue, 11 Mar 2025 15:17:29 +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=1741706249; cv=none; b=sg58cqD3jdbFOteC/Y1aCq2GfmVgPv2mmP3H/eHDgCDr31kD2bJqO1LCe1ybROROfPlgnFNGKkgAMDKZf6z4s34bDUbmSI1qD9b3/fW2o8VQr6CL3uGzkjbCPDje8HtsE0jWiJyKGWZbGuyCB8SchED0pN2bv2E7ImdkV0gMUeM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741706249; c=relaxed/simple; bh=IuMNf2qjzsDk3z43tS4wYBRBDS0Fj8aenDjZswFaYyE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vn8a578HDgXvo9rmY63pt8PhCnlj/oP30dVMCq8gROaFgFPiaGxWjQbFcDKMA836GPsUt8HEnDGADAwrCtQXJ/Rkz6YjHwWYjtNil3hfCETZ1vjkLx5i3zoKe6OjTK9Rfg1E/+dlFucORwmZajy2pz4/3a6syzl8kWHUfNfPTgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vuV/fYP3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vuV/fYP3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6AF9C4CEEA; Tue, 11 Mar 2025 15:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741706249; bh=IuMNf2qjzsDk3z43tS4wYBRBDS0Fj8aenDjZswFaYyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vuV/fYP390isCYYHTE9dJL8OezMCwFJeJS2ypKh2rKRkFxH9RSUuh6PELPZB1SVHY Zy5GIFGn+U1ezUobPnyU8/qFGXWZscHexGeWjJJt4fHgoCah0aPZPVo1efE6Dyu5Pc 1VO8v7iJU/bDO6CkoGfLd9sNYNjHrTYXI6m5XSFE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Yu-Chun Lin , Jiri Kosina , Sasha Levin Subject: [PATCH 5.4 294/328] HID: google: fix unused variable warning under !CONFIG_ACPI Date: Tue, 11 Mar 2025 16:01:04 +0100 Message-ID: <20250311145726.592916386@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250311145714.865727435@linuxfoundation.org> References: <20250311145714.865727435@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yu-Chun Lin [ Upstream commit 4bd0725c09f377ffaf22b834241f6c050742e4fc ] As reported by the kernel test robot, the following warning occurs: >> drivers/hid/hid-google-hammer.c:261:36: warning: 'cbas_ec_acpi_ids' defined but not used [-Wunused-const-variable=] 261 | static const struct acpi_device_id cbas_ec_acpi_ids[] = { | ^~~~~~~~~~~~~~~~ The 'cbas_ec_acpi_ids' array is only used when CONFIG_ACPI is enabled. Wrapping its definition and 'MODULE_DEVICE_TABLE' in '#ifdef CONFIG_ACPI' prevents a compiler warning when ACPI is disabled. Fixes: eb1aac4c8744f75 ("HID: google: add support tablet mode switch for Whiskers") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501201141.jctFH5eB-lkp@intel.com/ Signed-off-by: Yu-Chun Lin Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-google-hammer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c index 2ebad3ed4e3af..727c5c018cb92 100644 --- a/drivers/hid/hid-google-hammer.c +++ b/drivers/hid/hid-google-hammer.c @@ -258,11 +258,13 @@ static int cbas_ec_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_ACPI static const struct acpi_device_id cbas_ec_acpi_ids[] = { { "GOOG000B", 0 }, { } }; MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids); +#endif static struct platform_driver cbas_ec_driver = { .probe = cbas_ec_probe, -- 2.39.5