From patchwork Wed Apr 3 08:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 785568 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 B97DA839F7; Wed, 3 Apr 2024 08:08:46 +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=1712131726; cv=none; b=T2fHEObanKcY/TCei58VdxDb9WxOpL3fuea49phwh2K9ccgucmLnYLOGCbh1fonJSdEZ/pX6qHcE422EazH6jkzzDGxkWZlhoPoi68XJRzxgmcEs3U3EwVyowVSzy02LLIo+IoTR2bxxU/9AIhEUGzz9NfSxeYhJhHa3IWOVPLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131726; c=relaxed/simple; bh=FdHqMqMo9sUCpqipxuKBSJYP0dDiQNo82fvPaq1PpTc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CJXR2LjZHxzQC6NZZ8hqT+omf+qy5YSfc43crrnRCL7dh6cPV97Knq9JrCeaVXUS+oFhMVuR6siMwSj1ulNCXk1HGlNBNyZe2FcBbIg1Xk0dmUHHgEi+h8uXJjFCReK8HkcolKoTh7CKLbBszFMTE2bE8mRkbPOcVimknyhZB0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cr/P1UqD; 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="cr/P1UqD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE870C433F1; Wed, 3 Apr 2024 08:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131726; bh=FdHqMqMo9sUCpqipxuKBSJYP0dDiQNo82fvPaq1PpTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cr/P1UqDYRkzPKqWmBayNR3jsXD6jMn0kadZyFxqYE7IyvhZShvACgtnZHttX24IG r1JUFlP+XeTxLhjkf9rioOJNZDuspkIFHOuD9cjXIRhHsLmaiigk3Da/7Dui2ehupf nwl2kb0SRVwce6S20DGkI7cUjKWszmAY7dAiBNij74+qwVb7bS/ZkUweB77DTFIgbJ 3C0HVjZAaX13S9UvkBLXDa1GUYxy0hSgmFu3aU9eSzT+AnfaZhKidYmlZtxl1cueEw +Um7ksYhBu/qR2i+ILNCm8u5Mj993Z+Ln7r4uL+NW3t2VrrExsYg/XvJROJrSjLbDg hFlY7HeYvOqxg== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Dmitry Torokhov , Benjamin Tissoires Cc: Arnd Bergmann , =?utf-8?q?Jos=C3=A9_Pekkarinen?= , Raul Rangel , Jeffery Miller , linux-input@vger.kernel.org Subject: [PATCH 08/34] Input: synaptics: hide unused smbus_pnp_ids[] array Date: Wed, 3 Apr 2024 10:06:26 +0200 Message-Id: <20240403080702.3509288-9-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-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann When SMBUS is disabled, this is never referenced, causing a W=1 warning: drivers/input/mouse/synaptics.c:164:27: error: 'smbus_pnp_ids' defined but not used [-Werror=unused-const-variable=] Hide the array behind the same #ifdef as the code referencing it. Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices") Signed-off-by: Arnd Bergmann --- drivers/input/mouse/synaptics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 7a303a9d6bf7..bc22b75e64a7 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -161,6 +161,7 @@ static const char * const topbuttonpad_pnp_ids[] = { NULL }; +#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS static const char * const smbus_pnp_ids[] = { /* all of the topbuttonpad_pnp_ids are valid, we just add some extras */ "LEN0048", /* X1 Carbon 3 */ @@ -195,6 +196,7 @@ static const char * const smbus_pnp_ids[] = { "SYN3257", /* HP Envy 13-ad105ng */ NULL }; +#endif static const char * const forcepad_pnp_ids[] = { "SYN300D",