From patchwork Sat Apr 1 20:00:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Darren Hart X-Patchwork-Id: 9658221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A03C8602BC for ; Sat, 1 Apr 2017 20:00:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85BC8284DA for ; Sat, 1 Apr 2017 20:00:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776B228528; Sat, 1 Apr 2017 20:00:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 049C8284DA for ; Sat, 1 Apr 2017 20:00:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdDAUA1 (ORCPT ); Sat, 1 Apr 2017 16:00:27 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:47646 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbdDAUA0 (ORCPT ); Sat, 1 Apr 2017 16:00:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ey9DHp2GvnQcgfrS6Fy3zynUq0wVz3fnI9D9a9oQNqc=; b=dCqs77leM5XkkUtoatpnIaDE82 dU/0DNYmF5bdVKJO/6SFHqbKcT9dy7YXiijvQeyhodsq5exE9i07LFaSuReNpawQuAMLO3xYsaaBM t2ATV3r20B/i0WyWUyrOOE+Rf2tlCSehi25VL2wWfOqnlvqbADhSriPB/exQoBmjbNGwdiM40nFrC JajQBn6kHR6r9focUBcT8Ma7z84qI7YlwFmtYPl1u57coV8qIL6DpR3AJWONIXOKOw3kuY8P9+vg5 QHfMZ60ONbzoZbahjDNdcMQEOWuhUt7uvR/3IE8YnzTA+6j74HcJ6l91DsLOJTmUtCgK95FsqZhNK 7dwl85aQ==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1cuPCC-0006X8-5M; Sat, 01 Apr 2017 20:00:24 +0000 Date: Sat, 1 Apr 2017 13:00:23 -0700 From: Darren Hart To: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= Cc: Jonathan Woithe , Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] platform/x86: fujitsu-laptop: use a sparse keymap for hotkey event generation Message-ID: <20170401200023.GB5000@fury> References: <20170320093224.18541-1-kernel@kempniu.pl> <20170320093224.18541-7-kernel@kempniu.pl> <20170331112202.GA995@ozzy.nask.waw.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170331112202.GA995@ozzy.nask.waw.pl> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Mar 31, 2017 at 01:22:02PM +0200, Michał Kępień wrote: > > @@ -1098,14 +1075,8 @@ static void acpi_fujitsu_laptop_notify(struct acpi_device *device, u32 event) > > * handled in software; its state is queried using FUNC_FLAGS > > */ > > if ((fujitsu_laptop->flags_supported & BIT(26)) && > > - (call_fext_func(FUNC_FLAGS, 0x1, 0x0, 0x0) & BIT(26))) { > > - keycode = KEY_TOUCHPAD_TOGGLE; > > - input_report_key(input, keycode, 1); > > - input_sync(input); > > - input_report_key(input, keycode, 0); > > - input_sync(input); > > - } > > - > > + (call_fext_func(FLAG_RFKILL, 0x1, 0x0, 0x0) & BIT(26))) > > + sparse_keymap_report_event(input, BIT(26), 1, true); > > I have only just now noticed that a typo crept in here, causing a bug. > The original call to call_fext_func() passed FUNC_FLAGS as the first > argument while the added one uses FLAG_RFKILL instead. This is wrong as > call_fext_func() arguments should be left intact by this patch. > > Darren, could you please amend this in testing? The call_fext_func() > call added by the above patch chunk should pass FUNC_FLAGS as the first > argument, not FLAG_RFKILL. > > Thanks and sorry for the trouble. Gah, I didn't catch that either :( I've updated this patch with: in pdx86/testing, I'll push to for-next today, just as soon as CI confirms no issues. Thank you for catching it, diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 52d6d21..f66da4b 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -1074,7 +1074,7 @@ static void acpi_fujitsu_laptop_notify(struct acpi_device *device, u32 event) * handled in software; its state is queried using FUNC_FLAGS */ if ((fujitsu_laptop->flags_supported & BIT(26)) && - (call_fext_func(FLAG_RFKILL, 0x1, 0x0, 0x0) & BIT(26))) + (call_fext_func(FUNC_FLAGS, 0x1, 0x0, 0x0) & BIT(26))) sparse_keymap_report_event(input, BIT(26), 1, true); }