Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp784616lqb; Wed, 17 Apr 2024 10:32:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkjjYiJ2iVM8K2eAdz1WlwUCOp9yHna/BuzzCAn3d17VSOj/ahCxzg/tHlOJ+o+BUmIhR+2w1hu6dRNmifvI9bDYPlollhPAsp5JKIOA== X-Google-Smtp-Source: AGHT+IGmMhLe3ukF5Dq8OquMBjJ1xE1dOrGi/XDbbDNnPBkgw/WqsdnbjbDa63Ca2GCDAswf5Vep X-Received: by 2002:a05:620a:2586:b0:78e:c890:1aa9 with SMTP id x6-20020a05620a258600b0078ec8901aa9mr46228qko.39.1713375142405; Wed, 17 Apr 2024 10:32:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713375142; cv=pass; d=google.com; s=arc-20160816; b=X7PvMvqr71USScXKM2AHe5YHqhD4+422ONPXamA5sRDZf9WIb/enSu3Y/zinvJBU7c cxB1F7YsJbxzqN6UaMrn6bkIbHLzTjwmLiWRjOtwLvttuwvdnO4qUqSwXSL66gYnfwLk 0kgsr0poEJ9GQtR64yEbUWEqN1EyUgvHlHgug0cECyJa8cRt0GbeTGCLbYRKZvLr9uW3 pQRx+C5u/cGNcMcCj/dopeQPYEB1U/DQ7GsAn9dthI+CcaV7RVlJos3MExcuKesELX00 K8FPxeyTsrkwshhpF/X8RlSQQKCHCkxJlHChQaEhR35KPhnz60RLsoYLpSjp1PextvtF GYsw== 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:feedback-id:dkim-signature:dkim-signature; bh=8PaLecGiVuq16/Fn0qwhMRkqDVyOGQRBV6HYgL9CGPM=; fh=X6w54C159tCvovsw2PIdxi7Zi5cRh1P/Zi5PNPKiSKo=; b=SwZXz6qvUN8oJg4AUOd0fIjUzMW/qRVMSOoeC6ZMgyaQ3vVPx1fYvtW4oQZ9z8zFfI 7R0VuUWOHiJpoidJV4nELRIzYHJWnE0/aUlGJ06GsoEy20jTVIrGPyEN2e+a15EvVhdW SLtIRemr+qwJunNoQGoO7AncR9hWGuvrN+NiHX+Irett2/9aoDetTAGl5A4aDUH7LIac yrJTSFsj74iCEbRC2ZHuxd05Y32gH89pltgkW9r79FJ1cEVlyI2S3IDfrKDmjpkfQIXM v5duhsQHLWCv5J600tkhbRiWjYFwl6yYqApJkDXKLQTxQVbHaIsyHlhbtOT3U/t+G++p ztkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm3 header.b=XCTh1WsG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=inT51Q5R; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-148993-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148993-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e30-20020a05620a209e00b0078a3b070732si15626441qka.36.2024.04.17.10.32.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148993-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm3 header.b=XCTh1WsG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=inT51Q5R; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-148993-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148993-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C1441C23A0C for ; Wed, 17 Apr 2024 17:31:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 216E817167A; Wed, 17 Apr 2024 17:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b="XCTh1WsG"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="inT51Q5R" Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) (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 8E6DC17166F; Wed, 17 Apr 2024 17:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713375098; cv=none; b=aJfxxvcTt2nHL3/wdZ0MHAxlqZFmMKbJ+P6lbDi3ci5sfJ9EKMl/BE0dpfe9Ag91irZ7DLEklQwHhw+5oT2/qS6rJ1MNNZCWSIa1mEnKxeMkc9pRrrjWuwgYa38fxcDYyMPOuSSoDzQi9pKhnqP+apo6avZH1uwRfqX2Ofo6/8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713375098; c=relaxed/simple; bh=wO4+zecjacYU614piFeSaVyXG3E3j3lSRVKYXk0fH8Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mwp6Qr1UwbvOjm7JsSdpXTrUkahBS8lIJ/Lt4bo7AeWWqOyplvrgsPn/7Mz+RMSVlYU0Oy6DBY1zz9WyMHrayVmme67Ee0mqvQjfwlRXcSMQ5xo5Sv+wCPV50UxIKcdRnCrQmXoWsCEB53+URdLvzxQ9I0URoBtdJDP+hhphEN0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca; spf=pass smtp.mailfrom=squebb.ca; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b=XCTh1WsG; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=inT51Q5R; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squebb.ca Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 81A891380240; Wed, 17 Apr 2024 13:31:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Apr 2024 13:31:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1713375094; x= 1713461494; bh=8PaLecGiVuq16/Fn0qwhMRkqDVyOGQRBV6HYgL9CGPM=; b=X CTh1WsG7m7CeWuQXzC6O9miHFzw7D7qogV4q3SIgTXTOezHTWs4TYFVbNOiLpK5P ZUZWne6ullHLdyoYENd4KYt7U4FFn6tseiMHLfBu9jCay5g/vd35WjCLprlv+HPG o1BJ2Om3QJ1y0L3/VEu1mkYfnApBMjRtJ5yxuBfm4AnSo6+N6z0hTrd9D3O2ndW+ b/6DMztpxkqmRZJ56D/Fk8qVYub/LVySUt5NUgVPmu2qZETJQbZxMyirDJB7dfPJ AGuddqf5AltN/eSyWCW87w3pemY2hfuCidZ6arGaGGO3pxSUM/5Bz+im8BreGyC3 kijRMeqE2gEAdaAKgXeQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713375094; x= 1713461494; bh=8PaLecGiVuq16/Fn0qwhMRkqDVyOGQRBV6HYgL9CGPM=; b=i nT51Q5R7oQKSCArWg0YNMpfyKJd/hHShDzSR5iBBiJSTZfmnJq2URZk0Y7Z56inP 1ccdyRP7RWYVW/Yb5fSp0zy9odDDVZL23rMQSxVS16zzwwc9W/BX3lAJ2sRVPJ9l AnDEQlPMGv9yHj42TnP4PdKrfAvoWxEFrnZJyGDg5WOyQuCOF4ge5ZQ4h5BCc1gE cT94rw14Ju92fYhGNW5zDyjL7UJlsPbPj0UZG6GzswUoSAy7PBsmGxlfqOvQbFml V3PDAHCkcTgeUPaUf2oOaozkumj85CBDbXHyrDA1Mo99runo23Laxe2FbvQk3iqT TB1MXnSPcvdFEYKZQmi2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejkedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Apr 2024 13:31:33 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, hmh@hmh.eng.br, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, njoshi1@lenovo.com, vsankar@lenovo.com, peter.hutterer@redhat.com Subject: [PATCH v2 1/4] platform/x86: thinkpad_acpi: simplify known_ev handling Date: Wed, 17 Apr 2024 13:31:06 -0400 Message-ID: <20240417173124.9953-1-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Modify how known_ev event is handled in preparation for adding new keycode range. Signed-off-by: Mark Pearson --- Changes in v2: - New addition to series based on recommendations from review. - Note previous input patch was dropped so in numbering gets replaced by this. drivers/platform/x86/thinkpad_acpi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 82429e59999d..3b48d893280f 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4026,6 +4026,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) send_acpi_ev = true; ignore_acpi_ev = false; + known_ev = false; switch (hkey >> 12) { case 1: @@ -4051,8 +4052,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) /* FIXME: kick libata if SATA link offline */ known_ev = true; break; - default: - known_ev = false; } break; case 4: @@ -4078,11 +4077,8 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) tpacpi_send_radiosw_update(); send_acpi_ev = 0; known_ev = true; - break; } - fallthrough; /* to default */ - default: - known_ev = false; + break; } if (!known_ev) { pr_notice("unhandled HKEY event 0x%04x\n", hkey); -- 2.44.0