X86 platform drivers
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	"Matthew Garrett" <mjg59@srcf.ucam.org>
Subject: Re: [PATCH 3/3] dell_wmi: Improve unknown hotkey handling
Date: Fri, 20 Nov 2015 16:14:10 -0800	[thread overview]
Message-ID: <20151121001410.GI7413@malice.jf.intel.com> (raw)
In-Reply-To: <b7fd494ac6d51c13a66fec20ec336080479b0f5f.1447479930.git.luto@kernel.org>

On Fri, Nov 13, 2015 at 09:49:32PM -0800, Andy Lutomirski wrote:
> If DMI lists a hotkey that we don't recognize, log and ignore it
> instead of trying to map it to keycode 0.  I haven't seen this happen,
> but it will help maintain the key map in the future and it will help
> avoid sending bogus events.
> 
> This also improves the message that we log when we get an unknown key
> event.
> 
> Signed-off-by: Andy Lutomirski <luto@kernel.org>

Matthew? Pali? Any concerns?

> ---
>  drivers/platform/x86/dell-wmi.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index 92b0149fa4a7..e43228a35f6b 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -180,7 +180,7 @@ static void dell_wmi_process_key(int reported_key)
>  	key = sparse_keymap_entry_from_scancode(dell_wmi_input_dev,
>  						reported_key);
>  	if (!key) {
> -		pr_info("Unknown key %x pressed\n", reported_key);
> +		pr_info("Unknown key with scancode 0x%x pressed\n", reported_key);
>  		return;
>  	}
>  
> @@ -343,6 +343,11 @@ static const struct key_entry * __init dell_wmi_prepare_new_keymap(void)
>  				    bios_to_linux_keycode[bios_entry->keycode] :
>  				    KEY_RESERVED;
>  
> +		if (keycode == 0) {
> +			pr_info("firmware scancode %d maps to unrecognized keycode %d\n", bios_entry->keycode, bios_entry->scancode);

We don't split up strings for line length, but these arguments can certainly go
on the next line. I've taken care of this, no need to resend.

Queued for testing.

-- 
Darren Hart
Intel Open Source Technology Center

      parent reply	other threads:[~2015-11-21  0:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14  5:49 [PATCH 0/3] dell_wmi: XPS 13 Skylake support and misc stuff Andy Lutomirski
2015-11-14  5:49 ` [PATCH 1/3] dell_wmi: Support new hotkeys on the XPS 13 Skylake Andy Lutomirski
2015-11-14  9:27   ` Pali Rohár
2015-11-14 15:48     ` Andy Lutomirski
2015-11-14 16:13       ` Pali Rohár
     [not found]         ` <CALCETrWss=zCWhNkR2S_oi_m3W1xNO+UL_-uOnOVeLh5WHsDgQ@mail.gmail.com>
2015-11-17  8:36           ` Pali Rohár
2015-11-17 19:03             ` Andy Lutomirski
2015-11-18  3:44               ` Andy Lutomirski
2015-11-18 21:24   ` Andy Lutomirski
2015-11-19  8:19     ` Pali Rohár
2015-11-21  0:06   ` Darren Hart
2015-11-21  0:11     ` Pali Rohár
2015-11-21  0:12     ` Andy Lutomirski
2015-11-22  2:04       ` D. Jared Dominguez
2015-11-23 14:53         ` Pali Rohár
2016-01-21 10:17           ` Pali Rohár
2016-01-22  0:08             ` Mario Limonciello
2016-01-22  0:13               ` Andy Lutomirski
2016-01-22  8:26               ` Pali Rohár
2016-01-22 15:58                 ` Mario Limonciello
2016-01-22 17:11                   ` Pali Rohár
2015-11-14  5:49 ` [PATCH 2/3] dell_wmi: Use a C99-style array for bios_to_linux_keycode Andy Lutomirski
2015-11-14  9:30   ` Pali Rohár
2015-11-21  0:09   ` Darren Hart
2015-11-21  0:20     ` Pali Rohár
2015-11-21  0:26       ` Darren Hart
2015-11-21  0:28         ` Andy Lutomirski
2015-11-14  5:49 ` [PATCH 3/3] dell_wmi: Improve unknown hotkey handling Andy Lutomirski
2015-11-14  9:33   ` Pali Rohár
2015-11-17  1:35     ` Andy Lutomirski
2015-11-21  0:29       ` Darren Hart
2015-11-21  0:34         ` Andy Lutomirski
2015-11-21  0:41         ` Pali Rohár
2015-11-21  0:44           ` Andy Lutomirski
2015-11-21  0:14   ` Darren Hart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151121001410.GI7413@malice.jf.intel.com \
    --to=dvhart@infradead.org \
    --cc=luto@kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox