linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Benjamin Tissoires  " <benjamin.tissoires@redhat.com>
To: Andrew Duggan <aduggan@synaptics.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] HID: rmi: change logging level of log messages related to unexpected reports
Date: Tue, 15 Jul 2014 15:07:23 -0400	[thread overview]
Message-ID: <20140715190723.GC21045@mail.corp.redhat.com> (raw)
In-Reply-To: <1405114551-24354-2-git-send-email-aduggan@synaptics.com>

On Jul 11 2014 or thereabouts, Andrew Duggan wrote:
> Userspace tools may use hidraw to perform operations on the device from userspace while
> hid-rmi is bound to the device. This can cause hid-rmi to print error messages when its
> ->raw_event() callback gets called as the reports pass through the HID stack. In this case
> receiving responses which were not initiated by hid-rmi is not actually an error so the resulting
> error messages are incorrect and misleading. This patch changes the log messages to debug so
> that the messages can be turned on in the event that there is a problem and there is not
> a userspace tool running.
> 
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
> ---

Fair enough

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/hid-rmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
> index 578bbe6..25f571a 100644
> --- a/drivers/hid/hid-rmi.c
> +++ b/drivers/hid/hid-rmi.c
> @@ -377,7 +377,7 @@ static int rmi_input_event(struct hid_device *hdev, u8 *data, int size)
>  	irq_mask |= hdata->f30.irq_mask;
>  
>  	if (data[1] & ~irq_mask)
> -		hid_warn(hdev, "unknown intr source:%02lx %s:%d\n",
> +		hid_dbg(hdev, "unknown intr source:%02lx %s:%d\n",
>  			data[1] & ~irq_mask, __FILE__, __LINE__);
>  
>  	if (hdata->f11.interrupt_base < hdata->f30.interrupt_base) {
> @@ -400,7 +400,7 @@ static int rmi_read_data_event(struct hid_device *hdev, u8 *data, int size)
>  	struct rmi_data *hdata = hid_get_drvdata(hdev);
>  
>  	if (!test_bit(RMI_READ_REQUEST_PENDING, &hdata->flags)) {
> -		hid_err(hdev, "no read request pending\n");
> +		hid_dbg(hdev, "no read request pending\n");
>  		return 0;
>  	}
>  
> -- 
> 1.9.1
> 

  reply	other threads:[~2014-07-15 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 21:35 [PATCH] HID: rmi: add additional checks for the existence of optional queries in order to compute the address of Query 12 Andrew Duggan
2014-07-11 21:35 ` [PATCH] HID: rmi: change logging level of log messages related to unexpected reports Andrew Duggan
2014-07-15 19:07   ` Benjamin Tissoires   [this message]
2014-07-29  9:10     ` Jiri Kosina
2014-07-15 19:07 ` [PATCH] HID: rmi: add additional checks for the existence of optional queries in order to compute the address of Query 12 Benjamin Tissoires
2014-07-29  9:10   ` Jiri Kosina

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=20140715190723.GC21045@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).