From: Jiri Kosina <jkosina@suse.cz>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Nestor Lopez Casado <nlopezcasad@logitech.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] HID: logitech-hidpp: fix negated returns
Date: Tue, 4 Nov 2014 11:11:39 +0100 (CET) [thread overview]
Message-ID: <alpine.LNX.2.00.1411041111190.19451@pobox.suse.cz> (raw)
In-Reply-To: <1415048999-4490-1-git-send-email-benjamin.tissoires@redhat.com>
On Mon, 3 Nov 2014, Benjamin Tissoires wrote:
> Reported by Dan Carpenter:
>
> drivers/hid/hid-logitech-hidpp.c:359 hidpp_root_get_protocol_version() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:398 hidpp_devicenametype_get_count() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:417 hidpp_devicenametype_get_device_name() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:524 hidpp_touchpad_get_raw_info() warn: should this return really be negated?
>
> The problem lies in hidpp_send_message_sync() which can return 2 types of
> errors depending of their sign. Adding a comment there to clarify what is
> happening.
>
> To solve that, print an error in case of a protocol problem, and raise
> -EPROTO instead.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>
> Changes in v2:
> - also return if the ret code is negative
Applied.
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2014-11-04 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 21:09 [PATCH v2 1/2] HID: logitech-hidpp: fix negated returns Benjamin Tissoires
2014-11-03 21:09 ` [PATCH v2 2/2] HID: logitech-hidpp: 2 fixes in hidpp_root_get_protocol_version() Benjamin Tissoires
2014-11-04 10:12 ` Jiri Kosina
2014-11-04 7:30 ` [PATCH v2 1/2] HID: logitech-hidpp: fix negated returns Dan Carpenter
2014-11-04 10:11 ` 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.1411041111190.19451@pobox.suse.cz \
--to=jkosina@suse.cz \
--cc=benjamin.tissoires@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nlopezcasad@logitech.com \
/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).