From: Alexander Holler <holler@ahsoftware.de>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Henrik Rydberg <rydberg@euromail.se>,
Jiri Kosina <jkosina@suse.cz>, Stephane Chatty <chatty@enac.fr>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-input <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] HID: Use existing parser for pre-scanning the report descriptors
Date: Fri, 16 Aug 2013 10:54:52 +0200 [thread overview]
Message-ID: <520DE8DC.7020800@ahsoftware.de> (raw)
In-Reply-To: <CAN+gG=FEHefW-4XrCTkDY2_Jfj+uWZ=g_uc-2BsgFdW2My=VvA@mail.gmail.com>
Am 15.08.2013 19:36, schrieb Benjamin Tissoires:
> On Wed, Aug 14, 2013 at 10:03 PM, Alexander Holler <holler@ahsoftware.de> wrote:
>>>>> - 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.
>
> Hi Alexander,
>
> I think you misread what Henrik and I were discussing about:
> Henrik complained about using the heap for something which is just
> used in this function, and using the stack would have been better.
> However, the size of the parser is too big that the compiler complains
> when we declare it on the stack.
>
> So this line is just a copy/paste from the function hid_open_report(),
> and thus, you can agree that I did not create a new parser.
Hmm, not really, you do instantiate a new parser, wherever that one lives.
Of course, the code for the parser already exists, but at first I've
read the subject such, that something will be used which already was in
use. That "existing" did mislead me.
I think "Use hid_parser for ..." would describe the change more verbose
as the patch changes runtime behaviour quite a bit (by dispatching
everything through the parser).
Regards,
Alexander Holler
next prev parent reply other threads:[~2013-08-16 8:58 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
2013-08-15 17:36 ` Benjamin Tissoires
2013-08-16 8:54 ` Alexander Holler [this message]
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=520DE8DC.7020800@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).