linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: HID: kye: Add report fixup for Genius Manticore Keyboard
       [not found] <20131128051223.28802660D26@gitolite.kernel.org>
@ 2013-11-30 21:42 ` Dave Jones
  2013-12-02 14:16   ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2013-11-30 21:42 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Benjamin Tissoires, Jiri Kosina

 > Commit:     4a2c94c9b6c03af61b04993340bd9559e2277de4
 > Author:     Benjamin Tissoires <benjamin.tissoires@redhat.com>
 > AuthorDate: Wed Nov 20 09:49:41 2013 -0500
 > Committer:  Jiri Kosina <jkosina@suse.cz>
 > CommitDate: Thu Nov 21 10:28:58 2013 +0100
 > 
 >     HID: kye: Add report fixup for Genius Manticore Keyboard
 >     
 >     Genius Manticore Keyboard presents the same problem in its report
 >     descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
 >     Use the same fixup.

..

 > diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
 > index 7384512..35a4f9c 100644
 > --- a/drivers/hid/hid-kye.c
 > +++ b/drivers/hid/hid-kye.c
 > @@ -341,6 +341,9 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 >  	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
 >  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
 >  					"Genius Gx Imperator Keyboard");
 > +	case USB_DEVICE_ID_GENIUS_MANTICORE:
 > +		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
 > +					"Genius Manticore Keyboard");
 >  		break;


Is the IMPERATOR case supposed to fall-through to MANTICORE here, or is there a missing break ?
The commit text describes using the same fixup, but has this alternative case.

	Dave


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID: kye: Add report fixup for Genius Manticore Keyboard
  2013-11-30 21:42 ` HID: kye: Add report fixup for Genius Manticore Keyboard Dave Jones
@ 2013-12-02 14:16   ` Jiri Kosina
  2013-12-02 14:28     ` Dave Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2013-12-02 14:16 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel Mailing List, Benjamin Tissoires

On Sat, 30 Nov 2013, Dave Jones wrote:

>  > Commit:     4a2c94c9b6c03af61b04993340bd9559e2277de4
>  > Author:     Benjamin Tissoires <benjamin.tissoires@redhat.com>
>  > AuthorDate: Wed Nov 20 09:49:41 2013 -0500
>  > Committer:  Jiri Kosina <jkosina@suse.cz>
>  > CommitDate: Thu Nov 21 10:28:58 2013 +0100
>  > 
>  >     HID: kye: Add report fixup for Genius Manticore Keyboard
>  >     
>  >     Genius Manticore Keyboard presents the same problem in its report
>  >     descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
>  >     Use the same fixup.
> 
> ..
> 
>  > diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
>  > index 7384512..35a4f9c 100644
>  > --- a/drivers/hid/hid-kye.c
>  > +++ b/drivers/hid/hid-kye.c
>  > @@ -341,6 +341,9 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  >  	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
>  >  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
>  >  					"Genius Gx Imperator Keyboard");
>  > +	case USB_DEVICE_ID_GENIUS_MANTICORE:
>  > +		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
>  > +					"Genius Manticore Keyboard");
>  >  		break;
> 
> 
> Is the IMPERATOR case supposed to fall-through to MANTICORE here, or is there a missing break ?
> The commit text describes using the same fixup, but has this alternative case.

I am almost certain that the missing break is a mistake, and the offsets 
in both report descriptors are just different, and there is no need for 
two fixups.

I am queuing this for 3.13 still, but having final confirmation from 
Benjamin would of course be nice.

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID: kye: Add report fixup for Genius Manticore Keyboard
  2013-12-02 14:16   ` Jiri Kosina
@ 2013-12-02 14:28     ` Dave Jones
  2013-12-02 14:31       ` Jiri Kosina
  2013-12-02 14:32       ` Benjamin Tissoires
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Jones @ 2013-12-02 14:28 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Linux Kernel Mailing List, Benjamin Tissoires

On Mon, Dec 02, 2013 at 03:16:24PM +0100, Jiri Kosina wrote:
 > On Sat, 30 Nov 2013, Dave Jones wrote:
 > 
 > >  > Commit:     4a2c94c9b6c03af61b04993340bd9559e2277de4
 > >  > Author:     Benjamin Tissoires <benjamin.tissoires@redhat.com>
 > >  > AuthorDate: Wed Nov 20 09:49:41 2013 -0500
 > >  > Committer:  Jiri Kosina <jkosina@suse.cz>
 > >  > CommitDate: Thu Nov 21 10:28:58 2013 +0100
 > >  > 
 > >  >     HID: kye: Add report fixup for Genius Manticore Keyboard
 > >  >     
 > >  >     Genius Manticore Keyboard presents the same problem in its report
 > >  >     descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
 > >  >     Use the same fixup.
 > > 
 > > ..
 > > 
 > >  > diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
 > >  > index 7384512..35a4f9c 100644
 > >  > --- a/drivers/hid/hid-kye.c
 > >  > +++ b/drivers/hid/hid-kye.c
 > >  > @@ -341,6 +341,9 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 > >  >  	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
 > >  >  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
 > >  >  					"Genius Gx Imperator Keyboard");
 > >  > +	case USB_DEVICE_ID_GENIUS_MANTICORE:
 > >  > +		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
 > >  > +					"Genius Manticore Keyboard");
 > >  >  		break;
 > > 
 > > 
 > > Is the IMPERATOR case supposed to fall-through to MANTICORE here, or is there a missing break ?
 > > The commit text describes using the same fixup, but has this alternative case.
 > 
 > I am almost certain that the missing break is a mistake, and the offsets 
 > in both report descriptors are just different, and there is no need for 
 > two fixups.
 > 
 > I am queuing this for 3.13 still, but having final confirmation from 
 > Benjamin would of course be nice.

If that is the case..

-- 


Commit 4a2c94c9b6 inadvertantly removed a break from the GENIUS_GX_IMPERATOR case.
Spotted by Coverity.

Signed-off-by: Dave Jones <davej@fedoraproject.org>

diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index ecb5ca669e97..e77696367591 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -341,6 +341,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
 		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
 					"Genius Gx Imperator Keyboard");
+		break;
 	case USB_DEVICE_ID_GENIUS_MANTICORE:
 		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
 					"Genius Manticore Keyboard");


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: HID: kye: Add report fixup for Genius Manticore Keyboard
  2013-12-02 14:28     ` Dave Jones
@ 2013-12-02 14:31       ` Jiri Kosina
  2013-12-02 14:32       ` Benjamin Tissoires
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2013-12-02 14:31 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel Mailing List, Benjamin Tissoires

On Mon, 2 Dec 2013, Dave Jones wrote:

> Commit 4a2c94c9b6 inadvertantly removed a break from the GENIUS_GX_IMPERATOR case.
> Spotted by Coverity.
> 
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
> 
> diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
> index ecb5ca669e97..e77696367591 100644
> --- a/drivers/hid/hid-kye.c
> +++ b/drivers/hid/hid-kye.c
> @@ -341,6 +341,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
>  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
>  					"Genius Gx Imperator Keyboard");
> +		break;
>  	case USB_DEVICE_ID_GENIUS_MANTICORE:
>  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,

I've already taken Ben's original patch:

	https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-3.13/upstream-fixes

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID: kye: Add report fixup for Genius Manticore Keyboard
  2013-12-02 14:28     ` Dave Jones
  2013-12-02 14:31       ` Jiri Kosina
@ 2013-12-02 14:32       ` Benjamin Tissoires
  1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2013-12-02 14:32 UTC (permalink / raw)
  To: Dave Jones, Jiri Kosina, Linux Kernel Mailing List

On 02/12/13 09:28, Dave Jones wrote:
> On Mon, Dec 02, 2013 at 03:16:24PM +0100, Jiri Kosina wrote:
>  > On Sat, 30 Nov 2013, Dave Jones wrote:
>  > 
>  > >  > Commit:     4a2c94c9b6c03af61b04993340bd9559e2277de4
>  > >  > Author:     Benjamin Tissoires <benjamin.tissoires@redhat.com>
>  > >  > AuthorDate: Wed Nov 20 09:49:41 2013 -0500
>  > >  > Committer:  Jiri Kosina <jkosina@suse.cz>
>  > >  > CommitDate: Thu Nov 21 10:28:58 2013 +0100
>  > >  > 
>  > >  >     HID: kye: Add report fixup for Genius Manticore Keyboard
>  > >  >     
>  > >  >     Genius Manticore Keyboard presents the same problem in its report
>  > >  >     descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
>  > >  >     Use the same fixup.
>  > > 
>  > > ..
>  > > 
>  > >  > diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
>  > >  > index 7384512..35a4f9c 100644
>  > >  > --- a/drivers/hid/hid-kye.c
>  > >  > +++ b/drivers/hid/hid-kye.c
>  > >  > @@ -341,6 +341,9 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  > >  >  	case USB_DEVICE_ID_GENIUS_GX_IMPERATOR:
>  > >  >  		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83,
>  > >  >  					"Genius Gx Imperator Keyboard");
>  > >  > +	case USB_DEVICE_ID_GENIUS_MANTICORE:
>  > >  > +		rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
>  > >  > +					"Genius Manticore Keyboard");
>  > >  >  		break;
>  > > 
>  > > 
>  > > Is the IMPERATOR case supposed to fall-through to MANTICORE here, or is there a missing break ?
>  > > The commit text describes using the same fixup, but has this alternative case.
>  > 
>  > I am almost certain that the missing break is a mistake, and the offsets 
>  > in both report descriptors are just different, and there is no need for 
>  > two fixups.
>  > 
>  > I am queuing this for 3.13 still, but having final confirmation from 
>  > Benjamin would of course be nice.
> 
> If that is the case..
> 

Hi guys,

(sorry for the late answer, last week was Thanksgiving, and I was
enjoying US public holidays)

Definitively, this is my mistake. Thanks Dave for spotting it.

Jiri, I'll try to hold on the 3.12 stable queue on this one too (or ask
to add Dave's patch).

Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-02 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20131128051223.28802660D26@gitolite.kernel.org>
2013-11-30 21:42 ` HID: kye: Add report fixup for Genius Manticore Keyboard Dave Jones
2013-12-02 14:16   ` Jiri Kosina
2013-12-02 14:28     ` Dave Jones
2013-12-02 14:31       ` Jiri Kosina
2013-12-02 14:32       ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).