From: Alexander Holler <holler@ahsoftware.de>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: rydberg@euromail.se,
Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Jiri Kosina <jkosina@suse.cz>, Stephane Chatty <chatty@enac.fr>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] HID: Use existing parser for pre-scanning the report descriptors
Date: Wed, 14 Aug 2013 22:03:12 +0200 [thread overview]
Message-ID: <520BE280.6010407@ahsoftware.de> (raw)
In-Reply-To: <520BA464.9060200@redhat.com>
Am 14.08.2013 17:38, schrieb Benjamin Tissoires:
>>> {
>>> if (usage == HID_DG_CONTACTID)
>>> - hid->group = HID_GROUP_MULTITOUCH;
>>> + parser->flags |= HID_FLAG_MULTITOUCH;
>>
>> Did you consider reusing the group flags, e.g., parser->groups |= (1
>> << HID_GROUP_MULTITOUCH)? This change could be made regardless of the
>> parser logic.
>
> If nobody is against changing the values of the different groups across
> kernel version (which should be harmless), then I fully agree, we can
> use the group item as a bit field (but we would be able to only have 16
> different device groups).
Hmm, that might become a problem. E.g. all the HID sensors might be used
stand alone (without a sensor-hub, if someone modifies the drivers). But
I agree that currently the flags are just confusing and would introduce
them only if the number of groups reaches the limit.
>>> - hid->group = HID_GROUP_GENERIC;
>>> + parser = vzalloc(sizeof(struct hid_parser));
>>
>> Argh, I realize it is inevitable for this patch, but it still makes my
>> eyes bleed. The parser takes quite a bit of memory...
>
> Yep, my first attempt was to remove it, then I re-added it with a small
> tear...
So you actually create a new parser and the subject (that existing) of
this patch is misleading.
Regards,
Alexander Holler
next prev parent reply other threads:[~2013-08-14 20:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 14:58 [PATCH 0/3] HID: Win 8 multitouch panels detection in core Benjamin Tissoires
2013-08-13 14:58 ` [PATCH 1/3] HID: Use existing parser for pre-scanning the report descriptors Benjamin Tissoires
2013-08-13 18:37 ` Alexander Holler
2013-08-13 19:15 ` Benjamin Tissoires
2013-08-14 6:46 ` Alexander Holler
2013-08-14 15:08 ` Benjamin Tissoires
2013-08-14 16:07 ` Srinivas Pandruvada
2013-08-13 19:17 ` rydberg
2013-08-14 15:38 ` Benjamin Tissoires
2013-08-14 20:03 ` Alexander Holler [this message]
2013-08-15 17:36 ` Benjamin Tissoires
2013-08-16 8:54 ` Alexander Holler
2013-08-13 14:58 ` [PATCH 2/3] HID: detect Win 8 multitouch devices in core Benjamin Tissoires
2013-08-13 14:58 ` [PATCH 3/3] HID: do not init input reports for Win 8 multitouch devices Benjamin Tissoires
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=520BE280.6010407@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=benjamin.tissoires@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=chatty@enac.fr \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rydberg@euromail.se \
/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).