mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andy Whitcroft <apw@shadowen.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Dave Jones <davej@redhat.com>
Subject: Re: [PATCH] checkpatch: Attempt to find missing switch/case break;
Date: Fri, 13 Dec 2013 22:00:52 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1312132200040.12702@pobox.suse.cz> (raw)
In-Reply-To: <1386961580.2479.42.camel@joe-AO722>

On Fri, 13 Dec 2013, Joe Perches wrote:

> Also tested on all files in drivers/hid/
> 
> There is a hit for drivers/hid/hid-microsoft.c
> 
> I've no idea what's right here but adding a break or return
> or a "fall-through" comment would be nicer.
> 
> static int ms_ergonomy_kb_quirk(struct hid_input *hi, struct hid_usage *usage,
> 		unsigned long **bit, int *max)
> {
> 	struct input_dev *input = hi->input;
> 
> 	switch (usage->hid & HID_USAGE) {
> 	case 0xfd06: ms_map_key_clear(KEY_CHAT);	break;
> 	case 0xfd07: ms_map_key_clear(KEY_PHONE);	break;
> 	case 0xff05:
> 		set_bit(EV_REP, input->evbit);
> 		ms_map_key_clear(KEY_F13);
> 		set_bit(KEY_F14, input->keybit);
> 		set_bit(KEY_F15, input->keybit);
> 		set_bit(KEY_F16, input->keybit);
> 		set_bit(KEY_F17, input->keybit);
> 		set_bit(KEY_F18, input->keybit);
> 	default:
> 		return 0;
> 	}
> 	return 1;
> }

This is indeed a bug. I'll fix it with your Reported-by:, thanks.

-- 
Jiri Kosina
SUSE Labs

      reply	other threads:[~2013-12-13 21:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 19:06 Joe Perches
2013-12-13 21:00 ` Jiri Kosina [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=alpine.LNX.2.00.1312132200040.12702@pobox.suse.cz \
    --to=jkosina@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=davej@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®