linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: hid-gfrm: avoid warning for input_configured API change
@ 2015-11-03 14:56 Arnd Bergmann
  2015-11-03 19:33 ` Petri Gynther
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-11-03 14:56 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, Dmitry Torokhov
  Cc: linux-kernel, Petri Gynther, linux-arm-kernel

The input_configured callback was recently changed to return
an 'int', but the newly added driver uses the old API:

drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

This changes the driver like the other ones.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 34fc1322e7aa ("HID: hid-gfrm: Google Fiber TV Box remote controls")
Fixes: b2c68a2f1bab ("HID: hid-input: allow input_configured callback return errors")
---
Found on ARM allmodconfig with yesterday's linux-next

diff --git a/drivers/hid/hid-gfrm.c b/drivers/hid/hid-gfrm.c
index 4d7b7e7f0792..075b1c020846 100644
--- a/drivers/hid/hid-gfrm.c
+++ b/drivers/hid/hid-gfrm.c
@@ -88,7 +88,7 @@ static int gfrm_raw_event(struct hid_device *hdev, struct hid_report *report,
 	return (ret < 0) ? ret : -1;
 }
 
-static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
+static int gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
 {
 	/*
 	 * Enable software autorepeat with:
@@ -96,6 +96,7 @@ static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidi
 	 * - repeat period: 100 msec
 	 */
 	input_enable_softrepeat(hidinput->input, 400, 100);
+	return 0;
 }
 
 static int gfrm_probe(struct hid_device *hdev, const struct hid_device_id *id)


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

* Re: [PATCH] HID: hid-gfrm: avoid warning for input_configured API change
  2015-11-03 14:56 [PATCH] HID: hid-gfrm: avoid warning for input_configured API change Arnd Bergmann
@ 2015-11-03 19:33 ` Petri Gynther
  2015-11-03 23:48   ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Petri Gynther @ 2015-11-03 19:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jiri Kosina, linux-input, Dmitry Torokhov, linux-kernel,
	linux-arm-kernel

On Tue, Nov 3, 2015 at 6:56 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The input_configured callback was recently changed to return
> an 'int', but the newly added driver uses the old API:
>
> drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
>
> This changes the driver like the other ones.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Petri Gynther <pgynther@google.com>

> Fixes: 34fc1322e7aa ("HID: hid-gfrm: Google Fiber TV Box remote controls")
> Fixes: b2c68a2f1bab ("HID: hid-input: allow input_configured callback return errors")
> ---
> Found on ARM allmodconfig with yesterday's linux-next
>
> diff --git a/drivers/hid/hid-gfrm.c b/drivers/hid/hid-gfrm.c
> index 4d7b7e7f0792..075b1c020846 100644
> --- a/drivers/hid/hid-gfrm.c
> +++ b/drivers/hid/hid-gfrm.c
> @@ -88,7 +88,7 @@ static int gfrm_raw_event(struct hid_device *hdev, struct hid_report *report,
>         return (ret < 0) ? ret : -1;
>  }
>
> -static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
> +static int gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
>  {
>         /*
>          * Enable software autorepeat with:
> @@ -96,6 +96,7 @@ static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidi
>          * - repeat period: 100 msec
>          */
>         input_enable_softrepeat(hidinput->input, 400, 100);
> +       return 0;
>  }
>
>  static int gfrm_probe(struct hid_device *hdev, const struct hid_device_id *id)
>

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

* Re: [PATCH] HID: hid-gfrm: avoid warning for input_configured API change
  2015-11-03 19:33 ` Petri Gynther
@ 2015-11-03 23:48   ` Dmitry Torokhov
  2015-11-04  9:32     ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2015-11-03 23:48 UTC (permalink / raw)
  To: Petri Gynther
  Cc: Arnd Bergmann, Jiri Kosina, linux-input, linux-kernel, linux-arm-kernel

On Tue, Nov 03, 2015 at 11:33:11AM -0800, Petri Gynther wrote:
> On Tue, Nov 3, 2015 at 6:56 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > The input_configured callback was recently changed to return
> > an 'int', but the newly added driver uses the old API:
> >
> > drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
> >
> > This changes the driver like the other ones.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Acked-by: Petri Gynther <pgynther@google.com>

Hmm, the question is how to merge this, given that one change is in
Jiri's tree and another in mine...

> 
> > Fixes: 34fc1322e7aa ("HID: hid-gfrm: Google Fiber TV Box remote controls")
> > Fixes: b2c68a2f1bab ("HID: hid-input: allow input_configured callback return errors")
> > ---
> > Found on ARM allmodconfig with yesterday's linux-next
> >
> > diff --git a/drivers/hid/hid-gfrm.c b/drivers/hid/hid-gfrm.c
> > index 4d7b7e7f0792..075b1c020846 100644
> > --- a/drivers/hid/hid-gfrm.c
> > +++ b/drivers/hid/hid-gfrm.c
> > @@ -88,7 +88,7 @@ static int gfrm_raw_event(struct hid_device *hdev, struct hid_report *report,
> >         return (ret < 0) ? ret : -1;
> >  }
> >
> > -static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
> > +static int gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
> >  {
> >         /*
> >          * Enable software autorepeat with:
> > @@ -96,6 +96,7 @@ static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidi
> >          * - repeat period: 100 msec
> >          */
> >         input_enable_softrepeat(hidinput->input, 400, 100);
> > +       return 0;
> >  }
> >
> >  static int gfrm_probe(struct hid_device *hdev, const struct hid_device_id *id)
> >

-- 
Dmitry

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

* Re: [PATCH] HID: hid-gfrm: avoid warning for input_configured API change
  2015-11-03 23:48   ` Dmitry Torokhov
@ 2015-11-04  9:32     ` Jiri Kosina
  2015-11-05 18:23       ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2015-11-04  9:32 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Petri Gynther, Arnd Bergmann, linux-input, linux-kernel,
	linux-arm-kernel

On Tue, 3 Nov 2015, Dmitry Torokhov wrote:

> > > The input_configured callback was recently changed to return
> > > an 'int', but the newly added driver uses the old API:
> > >
> > > drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
> > >
> > > This changes the driver like the other ones.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Acked-by: Petri Gynther <pgynther@google.com>
> 
> Hmm, the question is how to merge this, given that one change is in
> Jiri's tree and another in mine...

In this case probably the best course of action is you cherry-picking 
b2c68a2f1bab from my tree into yours, and proceeding further. git can 
handle doubled commits (that will end up in Linus' tree eventually) 
easily.

Another option would be to create a joint merge tree that'd contain both 
branches merged together and proceed further from that, but I don't think 
it's worth the hassle for simple case like this.

Works for you?

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

* Re: [PATCH] HID: hid-gfrm: avoid warning for input_configured API change
  2015-11-04  9:32     ` Jiri Kosina
@ 2015-11-05 18:23       ` Dmitry Torokhov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2015-11-05 18:23 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Petri Gynther, Arnd Bergmann, linux-input, linux-kernel,
	linux-arm-kernel

On Wed, Nov 04, 2015 at 10:32:24AM +0100, Jiri Kosina wrote:
> On Tue, 3 Nov 2015, Dmitry Torokhov wrote:
> 
> > > > The input_configured callback was recently changed to return
> > > > an 'int', but the newly added driver uses the old API:
> > > >
> > > > drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
> > > >
> > > > This changes the driver like the other ones.
> > > >
> > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > Acked-by: Petri Gynther <pgynther@google.com>
> > 
> > Hmm, the question is how to merge this, given that one change is in
> > Jiri's tree and another in mine...
> 
> In this case probably the best course of action is you cherry-picking 
> b2c68a2f1bab from my tree into yours, and proceeding further. git can 
> handle doubled commits (that will end up in Linus' tree eventually) 
> easily.
> 
> Another option would be to create a joint merge tree that'd contain both 
> branches merged together and proceed further from that, but I don't think 
> it's worth the hassle for simple case like this.
> 
> Works for you?

I went the cherry-pick route.

Thanks.

-- 
Dmitry

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

end of thread, other threads:[~2015-11-05 18:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 14:56 [PATCH] HID: hid-gfrm: avoid warning for input_configured API change Arnd Bergmann
2015-11-03 19:33 ` Petri Gynther
2015-11-03 23:48   ` Dmitry Torokhov
2015-11-04  9:32     ` Jiri Kosina
2015-11-05 18:23       ` Dmitry Torokhov

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).