Received: by 10.223.164.202 with SMTP id h10csp3367271wrb; Tue, 28 Nov 2017 10:08:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMYEpT2Nlq1oShHeHlC2DhA54ADvNmLoESgFrMCCN5qM2+4td6pzWjHiqZ9AB6akfNK7Bntk X-Received: by 10.99.124.88 with SMTP id l24mr42579575pgn.355.1511892511092; Tue, 28 Nov 2017 10:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511892511; cv=none; d=google.com; s=arc-20160816; b=OedN72DhmPwQw8AnL77H/AiNyh4u6JW2qev8TogxU7WMhs+SQsw8Tvi1vr+UjEfJ5z w1k6APKiyasLR1/5Q8TZOmPF9dTiQM0FSeEr//+nrOuxTlh+2XvpxrXmUGm3vgkOZo12 joy5Vek3KpM64ZEiwo/maDJ7dC8eEW02YLoFRF46GiTTpndaAPeUWsCRH9f6M7tCzkEl C/iDPfc6ejh/N7T/XHyL6800MvRZUTbvgZnfx2ARcWMfrWhz6MgPuxP9M8YZ2oTtrrGB DgZYsRBJGHty3jJy0V1/iQC7YWGACEiu+D1seV2+veGcgZ4Q1Erf8R3LMR3OoxG3lx+S y+xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=2OKKShAWRwgBQlScpDwWoQG9Oq4lbPkI8frezVGgjLU=; b=uhSZdBPD0BKSiakSsS+JiS9sU0fq6lKypqT6YyGep2h+EFf0bcIFBEhgRc5g2HDsWU lSFZYEiOA/rCphThAZ5Qt2qKEbr+VUnys8lBZKvg36Dw2j/HbTXx93cQ2a6Y1Mq10CZ2 q6bcnLd/H2xW9sfRNOrv58K9+1SUuj70yXBlUApw7wTbLuoWSFlkm0gxKdfHSGK9xIil wvccG1Q8eA6muHy0n74ZLpjxxS/hmuRV+M8uexvH6s9oWlyq3tvILVFBA3e7mNR9Nl70 pKWQ6x1++9+S923Q5IOTHLiWBRN/owh6yUUgBZo155m6ZwSrL5pZGA7F7ZwDgyQww0/W n5VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si21672914pli.201.2017.11.28.10.08.02; Tue, 28 Nov 2017 10:08:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374AbdK1SGO (ORCPT + 78 others); Tue, 28 Nov 2017 13:06:14 -0500 Received: from mail.netline.ch ([148.251.143.178]:43261 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbdK1SGN (ORCPT ); Tue, 28 Nov 2017 13:06:13 -0500 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 161172E200A; Tue, 28 Nov 2017 19:06:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WxextkhnH-aG; Tue, 28 Nov 2017 19:06:09 +0100 (CET) Received: from thor (81.67.199.178.dynamic.wline.res.cust.swisscom.ch [178.199.67.81]) by netline-mail3.netline.ch (Postfix) with ESMTPSA id 99B662E2009; Tue, 28 Nov 2017 19:06:09 +0100 (CET) Received: from localhost ([::1]) by thor with esmtp (Exim 4.89) (envelope-from ) id 1eJkGm-0006Il-T0; Tue, 28 Nov 2017 19:06:08 +0100 Subject: Re: [PATCH] platform/x86: hp-wmi: Actually use mask parameter in hp_wmi_hw_state To: Darren Hart Cc: Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171128151758.9234-1-michel@daenzer.net> <20171128165724.GA16349@fury> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: Date: Tue, 28 Nov 2017 19:06:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171128165724.GA16349@fury> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-28 05:57 PM, Darren Hart wrote: > On Tue, Nov 28, 2017 at 04:17:58PM +0100, Michel Dänzer wrote: >> We were always checking bit 0 (which represents the docked state) >> regardless of the mask. >> >> Fixes the "tablet mode" state always being reported the same as the >> docked state, which with current libinput can cause the built-in input >> devices of laptops to be incorrectly disabled while docked. >> >> Cc: stable@vger.kernel.org >> Fixes: ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") >> Signed-off-by: Michel Dänzer >> --- >> drivers/platform/x86/hp-wmi.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c >> index b4ed3dc983d5..2bdd6bbdb353 100644 >> --- a/drivers/platform/x86/hp-wmi.c >> +++ b/drivers/platform/x86/hp-wmi.c >> @@ -297,7 +297,7 @@ static int hp_wmi_hw_state(int mask) >> if (state < 0) >> return state; >> >> - return state & 0x1; >> + return (state & mask) ? 1 : 0; > > The current code does: > > return !!(state & mask); > > See: > 9968e12 platform/x86: hp-wmi: Fix tablet mode detection for convertibles > > Merged in 4.15-rc1 AFAIK commits without Cc: stable@vger.kernel.org don't get automatically picked up for stable branches. Can you manually nominate 9968e12 for stable? Thanks, -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer From 1585329818897744705@xxx Tue Nov 28 16:58:51 +0000 2017 X-GM-THRID: 1585323558681774804 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread