From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755878AbcCCSp2 (ORCPT ); Thu, 3 Mar 2016 13:45:28 -0500 Received: from mail-lb0-f193.google.com ([209.85.217.193]:36289 "EHLO mail-lb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089AbcCCSp0 (ORCPT ); Thu, 3 Mar 2016 13:45:26 -0500 Date: Thu, 3 Mar 2016 19:46:32 +0100 From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= To: Darren Hart Cc: Pali =?utf-8?B?Um9ow6Fy?= , Matthew Garrett , Darek Stojaczyk , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch hotkey Message-ID: <20160303184632.GA26514@eudyptula.hq.kempniu.pl> References: <1455634230-1487-1-git-send-email-kernel@kempniu.pl> <201602292139.16006@pali> <20160229204927.GB23568@eudyptula.hq.kempniu.pl> <201602292156.03876@pali> <20160229230015.GF7499@dvhart-mobl5.amr.corp.intel.com> <20160302123504.GB25223@eudyptula.hq.kempniu.pl> <20160303171655.GD1092@dvhart-mobl5.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160303171655.GD1092@dvhart-mobl5.amr.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Your description below helped explain why the KE_KEY change was necessary, the > commit message didn't do that for me. Just explicitly stating "when there is no > i8042 interrupt, the WMI even must generate a valid KE_KEY" or something along > those lines would help. I will do that in v5, then. > > > > > > > > > { KE_IGNORE, 0xe026, { KEY_RESERVED } }, > > > > > > > > > > > > > > > > > > { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } }, > > > > > > > > > > > > > > > > > > @@ -235,6 +235,9 @@ static void dell_wmi_process_key(int > > > > > > > > > reported_key) > > > > > > > > > > > > > > > > > > acpi_video_handles_brightness_key_presses()) > > > > > > > > > > > > > > > > > > return; > > > > > > > > > > > > > > > > > > + if (key->keycode == KEY_PROG4 && > > > > > > > > > !wmi_requires_smbios_request) + return; > > > > > > > > > + > > > > > > > > > > > > > > > > Here I would rather test against reported_key, not keycode. If > > > > > > > > somebody in future adds KEY_PROG4 for something else we will > > > > > > > > have problem... > > And ultimately, that is under our control. So let's just not do that :-) > > A comment by the definition of KEY_PROG4 that notes it's meaning in this driver > should prevent any future attempts at overloading it and breaking this. As I'll be sending a v5 anyway, do you think Pali's idea is bad? Personally, I'm leaning towards it. IMHO comparing against reported_key would emphasize the fact that only event 0xe025 is "special" and chances are that there are no other WMI event codes which need to be handled this way. -- Best regards, Michał Kępień