linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors
@ 2020-01-13 19:23 Filipe Laíns
  2020-01-14  1:24 ` Benjamin Tissoires
  2020-02-12 13:45 ` Jiri Kosina
  0 siblings, 2 replies; 4+ messages in thread
From: Filipe Laíns @ 2020-01-13 19:23 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kernel
  Cc: Filipe Laíns

When exporting all other types of report descriptors we print a debug
message. Not doing so for HID++ descriptors makes unaware users think
that no HID++ descriptor was exported.

Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
 drivers/hid/hid-logitech-dj.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index cc7fc71d8b05..8f17a29b5a94 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1368,6 +1368,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
 	}
 
 	if (djdev->reports_supported & HIDPP) {
+		dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
+			__func__, djdev->reports_supported);
 		rdcat(rdesc, &rsize, hidpp_descriptor,
 		      sizeof(hidpp_descriptor));
 	}
-- 
2.24.1

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

* Re: [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors
  2020-01-13 19:23 [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors Filipe Laíns
@ 2020-01-14  1:24 ` Benjamin Tissoires
  2020-01-14  1:47   ` Filipe Laíns
  2020-02-12 13:45 ` Jiri Kosina
  1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2020-01-14  1:24 UTC (permalink / raw)
  To: Filipe Laíns; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml

Hi Filipe,

On Tue, Jan 14, 2020 at 5:23 AM Filipe Laíns <lains@archlinux.org> wrote:
>
> When exporting all other types of report descriptors we print a debug
> message. Not doing so for HID++ descriptors makes unaware users think
> that no HID++ descriptor was exported.

Unless I am mistaken, those dbg_hid() calls are not displayed by
default on any distribution. So I am not sure what is the benefit to
add this one here when we are already not showing the rest to the
users by default. There is a tiny improvement to have some code
symmetry, but here, honestly, it doesn't feel that required.

Cheers,
Benjamin

>
> Signed-off-by: Filipe Laíns <lains@archlinux.org>
> ---
>  drivers/hid/hid-logitech-dj.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index cc7fc71d8b05..8f17a29b5a94 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -1368,6 +1368,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
>         }
>
>         if (djdev->reports_supported & HIDPP) {
> +               dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
> +                       __func__, djdev->reports_supported);
>                 rdcat(rdesc, &rsize, hidpp_descriptor,
>                       sizeof(hidpp_descriptor));
>         }
> --
> 2.24.1
>


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

* Re: [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors
  2020-01-14  1:24 ` Benjamin Tissoires
@ 2020-01-14  1:47   ` Filipe Laíns
  0 siblings, 0 replies; 4+ messages in thread
From: Filipe Laíns @ 2020-01-14  1:47 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, open list:HID CORE LAYER, lkml

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

On Tue, 2020-01-14 at 11:24 +1000, Benjamin Tissoires wrote:
> Hi Filipe,
> 
> On Tue, Jan 14, 2020 at 5:23 AM Filipe Laíns <lains@archlinux.org> wrote:
> > When exporting all other types of report descriptors we print a debug
> > message. Not doing so for HID++ descriptors makes unaware users think
> > that no HID++ descriptor was exported.
> 
> Unless I am mistaken, those dbg_hid() calls are not displayed by
> default on any distribution. So I am not sure what is the benefit to
> add this one here when we are already not showing the rest to the
> users by default. There is a tiny improvement to have some code
> symmetry, but here, honestly, it doesn't feel that required.
> 
> Cheers,
> Benjamin

Hi Benjamin,

As far as I know, they aren't. This was just a nitpick. As I already
had the code locally I decided to just go ahead and submit the patch.
But noted, I won't submit any more of this nitpick patches.

> > Signed-off-by: Filipe Laíns <lains@archlinux.org>
> > ---
> >  drivers/hid/hid-logitech-dj.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> > index cc7fc71d8b05..8f17a29b5a94 100644
> > --- a/drivers/hid/hid-logitech-dj.c
> > +++ b/drivers/hid/hid-logitech-dj.c
> > @@ -1368,6 +1368,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
> >         }
> > 
> >         if (djdev->reports_supported & HIDPP) {
> > +               dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
> > +                       __func__, djdev->reports_supported);
> >                 rdcat(rdesc, &rsize, hidpp_descriptor,
> >                       sizeof(hidpp_descriptor));
> >         }
> > --
> > 2.24.1
> > 

Thank you,
Filipe Laíns

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors
  2020-01-13 19:23 [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors Filipe Laíns
  2020-01-14  1:24 ` Benjamin Tissoires
@ 2020-02-12 13:45 ` Jiri Kosina
  1 sibling, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2020-02-12 13:45 UTC (permalink / raw)
  To: Filipe Laíns; +Cc: Benjamin Tissoires, linux-input, linux-kernel

On Mon, 13 Jan 2020, Filipe Laíns wrote:

> When exporting all other types of report descriptors we print a debug
> message. Not doing so for HID++ descriptors makes unaware users think
> that no HID++ descriptor was exported.
> 
> Signed-off-by: Filipe Laíns <lains@archlinux.org>
> ---
>  drivers/hid/hid-logitech-dj.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index cc7fc71d8b05..8f17a29b5a94 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -1368,6 +1368,8 @@ static int logi_dj_ll_parse(struct hid_device *hid)
>  	}
>  
>  	if (djdev->reports_supported & HIDPP) {
> +		dbg_hid("%s: sending a HID++ descriptor, reports_supported: %llx\n",
> +			__func__, djdev->reports_supported);
>  		rdcat(rdesc, &rsize, hidpp_descriptor,
>  		      sizeof(hidpp_descriptor));

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2020-02-12 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 19:23 [PATCH] HID: logitech-dj: add debug msg when exporting a HID++ report descriptors Filipe Laíns
2020-01-14  1:24 ` Benjamin Tissoires
2020-01-14  1:47   ` Filipe Laíns
2020-02-12 13:45 ` Jiri Kosina

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