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 0B29722B8BD; Mon, 10 Mar 2025 17:33:44 +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=1741628025; cv=none; b=BPFF9Q5ilXDJnZeFDB5o+N78bdxjtuPOaJhetadBtF3P/v5o+bBknQJQOeVI8GhfYrJghK1KeoMHADQnOHJTonEgJZtmO4YII9EfDwBZuhT6a6OFx01FcU9O6tM1oWVs0OxuJ2JyS3FqONv5+wbGJLkk/BF7Jk8RGsidssKiNUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741628025; c=relaxed/simple; bh=GDjL9XVYXFnIJZ816SlDvf1hTR1lGeKIlC3n20QyZkc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jmcf6aJFyunoDalw+9/ALPptgMUl4ehFTztk1BTKsedQufcw9L5EzFe8QEwug7IJbhgdpZ/cL9YUYRT7Ucuu4lPU4l2jCYudzNclgzXpzM5OZtn+cxhVUh95ZuUAU0KHQxk8E0Payz3aGN/H7XbBUB104eg2gTXND1oAKhOqs9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LKzQm87D; 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="LKzQm87D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83BE4C4CEE5; Mon, 10 Mar 2025 17:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741628024; bh=GDjL9XVYXFnIJZ816SlDvf1hTR1lGeKIlC3n20QyZkc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LKzQm87DEhcpWhWtf+eUgCroYYXxQozWxcEh4eqTxTbDddDEr4ov7qTMM3VittgLV 3ZVD9ETfYWorgXeMsdC7csZ92jCPf0MkgtVYfqBRecgvuQ/6NyJgZtopJrAkWVd8S8 xHt0w7AL2JiZ9tsHVEheNHl/bjpsLsmWfC1f/j7M= 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 6.6 060/145] HID: google: fix unused variable warning under !CONFIG_ACPI Date: Mon, 10 Mar 2025 18:05:54 +0100 Message-ID: <20250310170437.166791136@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310170434.733307314@linuxfoundation.org> References: <20250310170434.733307314@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 6.6-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 c6bdb9c4ef3e0..d25291ed900d0 100644 --- a/drivers/hid/hid-google-hammer.c +++ b/drivers/hid/hid-google-hammer.c @@ -269,11 +269,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 #ifdef CONFIG_OF static const struct of_device_id cbas_ec_of_match[] = { -- 2.39.5