All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Kramkowski <tk@the-tk.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: "Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
	"Yuxuan Shui" <yshuiv7@gmail.com>,
	"Diego Elio Pettenò" <flameeyes@flameeyes.eu>,
	"Alex Manoussakis" <amanou@gnu.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice
Date: Tue, 5 Dec 2017 20:17:52 +0000	[thread overview]
Message-ID: <20171205201307.GA13831@gaia.local> (raw)
In-Reply-To: <20171204205550.2621-1-tk@the-tk.com>

On Mon, Dec 04, 2017 at 08:55:50PM +0000, Tomasz Kramkowski wrote:
> +static void mouse_button_fixup(struct hid_device *hdev,
> +			       __u8 *rdesc, unsigned int *rsize,
> +			       int nbuttons)

I've just remembered what has been bugging me yesterday when I was
reviewing this patch. I had come to the realisation (and then
subsequently forgotten) that this function should probably return __u8 *
and also get assigned to rdesc on the other end. It seems to me that it
makes most sense to allow for the possibility (although slim) of this
function eventually being expanded to actually replace the report
descriptor (technically the full report descriptor contains a bunch of
useless crap like INPUT reports for media keys and the FEATURE report
which as far as I can tell is totally useless or may or may not be some
tactic by ELECOM to future-proof their firmware).

The other option would be to make rsize not a pointer because it doesn't
need to be. But that kind of makes the flow of the two functions
somewhat inconsistent. I'm not sure if I'm alone in that feeling.

Anyway, I should have written this down when I first caught it, sorry
for the noise. I'll let you guys review this patch and give any other
feedback you might have and I'll try to get a v2 as soon as possible
afterwards.

-- 
Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/

  reply	other threads:[~2017-12-05 20:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 20:55 [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice Tomasz Kramkowski
2017-12-05 20:17 ` Tomasz Kramkowski [this message]
2017-12-07 10:04   ` Jiri Kosina
2017-12-09 17:23     ` Tomasz Kramkowski
2017-12-11 10:28       ` Jiri Kosina
2017-12-11 17:31         ` Alex Manoussakis
2017-12-13 21:47           ` Tomasz Kramkowski
2017-12-14  1:02             ` Alex Manoussakis
2017-12-19 20:44 ` [PATCH v2] " Tomasz Kramkowski
2018-01-23 14:40   ` 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=20171205201307.GA13831@gaia.local \
    --to=tk@the-tk.com \
    --cc=amanou@gnu.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=flameeyes@flameeyes.eu \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yshuiv7@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.