From: Greg KH <gregkh@suse.de>
To: KY Srinivasan <kys@microsoft.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"ohering@suse.com" <ohering@suse.com>,
"joe@perches.com" <joe@perches.com>,
"jkosina@suse.cz" <jkosina@suse.cz>
Subject: Re: [PATCH 1/1] Staging: hv: Move the mouse driver out of staging
Date: Tue, 8 Nov 2011 16:49:03 -0800 [thread overview]
Message-ID: <20111109004903.GA2144@suse.de> (raw)
In-Reply-To: <6E21E5352C11B742B20C142EB499E0481AA69FD0@TK5EX14MBXC128.redmond.corp.microsoft.com>
On Wed, Nov 09, 2011 at 12:45:30AM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
> > Sent: Monday, November 07, 2011 12:51 AM
> > To: KY Srinivasan
> > Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> > devel@linuxdriverproject.org; virtualization@lists.osdl.org; ohering@suse.com;
> > joe@perches.com; jkosina@suse.cz
> > Subject: Re: [PATCH 1/1] Staging: hv: Move the mouse driver out of staging
> >
> > Hi K. Y,
> >
> > On Mon, Nov 07, 2011 at 01:04:53AM +0000, KY Srinivasan wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
> > > > Sent: Saturday, November 05, 2011 2:48 AM
> > > > To: KY Srinivasan
> > > > Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> > > > devel@linuxdriverproject.org; virtualization@lists.osdl.org;
> > ohering@suse.com;
> > > > joe@perches.com; jkosina@suse.cz
> > > > Subject: Re: [PATCH 1/1] Staging: hv: Move the mouse driver out of staging
> > > >
> > > > Hi KY,
> > >
> > > Dimitry,
> > >
> > > Let me begin by thanking you for taking the time to review. I have incorporated
> > > pretty much all your suggestions.
> >
> > Thank you very much for considering my suggestions.
>
> >
> > > >
> > > > Instead of potentially ever-increasing buffer that you also allocate
> > > > (and it looks like leaking on every callback invocation) can you just
> > > > repeat the read if you know that there are more data and use single
> > > > pre-allocated buffer?
> > >
> > > The ring-buffer protocol is such that we need to consume the full message.
> > > Also, why do you say we are leaking memory?
> >
> > Ah, OK, I see, we keep reading until read returns 0-sized reply and then
> > we free the buffer... Never mind then.
> >
> > > > > +
> > > > > + hid_dev->ll_driver = &mousevsc_ll_driver;
> > > > > + hid_dev->driver = &mousevsc_hid_driver;
> > > >
> > > > You are not really hid driver; you are more of a "provider" so why do
> > > > you need to set hid_dev->driver in addition to hid_dev->ll_driver?
> > > >
> > > True, but hid_parse_report() expects that the driver field be set; so I
> > > need to fake this.
> >
> > If you supply .parse() method for your mousevsc_ll_driver structure and
> > call hid_parse_report() from it then HID core will set the default
> > driver and call parse at appropriate time.
>
> Would it be ok if I were to make this change after Jiri accepts the driver out of staging?
Why not fix this now? No need to take a driver that is known to have
issues, right?
greg k-h
next prev parent reply other threads:[~2011-11-09 1:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 22:35 K. Y. Srinivasan
2011-10-28 22:54 ` Jesper Juhl
2011-10-29 6:32 ` Dan Carpenter
2011-10-30 16:16 ` KY Srinivasan
2011-11-02 22:59 ` Jesper Juhl
2011-11-02 23:04 ` KY Srinivasan
2011-11-05 6:47 ` Dmitry Torokhov
2011-11-07 1:04 ` KY Srinivasan
2011-11-07 5:51 ` Dmitry Torokhov
2011-11-09 0:45 ` KY Srinivasan
2011-11-09 0:49 ` Greg KH [this message]
2011-11-09 3:19 ` KY Srinivasan
2011-11-09 14:43 ` KY Srinivasan
2011-11-13 20:02 ` Jiri Kosina
2011-11-14 2:42 ` KY Srinivasan
2011-11-13 20:01 ` Jiri Kosina
2011-11-14 0:47 ` Dmitry Torokhov
2011-11-14 2:45 ` KY Srinivasan
2011-11-14 2:40 ` KY Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2011-11-09 17:23 K. Y. Srinivasan
2011-10-26 16:08 K. Y. Srinivasan
2011-10-27 10:37 ` Olaf Hering
2011-10-27 13:25 ` KY Srinivasan
2011-10-28 18:47 ` Jiri Kosina
2011-10-28 19:50 ` KY Srinivasan
2011-10-28 20:03 ` Greg KH
2011-10-28 20:28 ` KY Srinivasan
2011-10-29 6:34 ` Greg KH
2011-10-29 14:09 ` KY Srinivasan
2011-10-29 17:05 ` Jiri Kosina
2011-10-30 16:16 ` KY Srinivasan
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=20111109004903.GA2144@suse.de \
--to=gregkh@suse.de \
--cc=devel@linuxdriverproject.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=joe@perches.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ohering@suse.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
Powered by JetHome