lkml.org 
[lkml]   [2014]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2 1/1] Drivers: hv: Implement the file copy service
Date


> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Thursday, January 16, 2014 3:27 AM
> To: KY Srinivasan
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; apw@canonical.com; jasowang@redhat.com
> Subject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service
>
> On Tue, Jan 14, K. Y. Srinivasan wrote:
>
> This function should return valid numbers:
>
> > +static ssize_t fcopy_write(struct file *file, const char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + int error = 0;
> > +
> > + if (count != sizeof(int))
> > + return 0;
>
> Should be an error.
>
> > +
> > + if (copy_from_user(&error, buf, sizeof(int)))
> > + return -EFAULT;
> > +
> > + if (in_hand_shake) {
> > + fcopy_handle_handshake();
> > + return 0;
>
> Should be sizeof(int).
>
> > + }
> > +
> > + /*
> > + * Complete the transaction by forwarding the result
> > + * to the host. But first, cancel the timeout.
> > + */
> > + if (cancel_delayed_work_sync(&fcopy_work))
> > + fcopy_respond_to_host(error);
> > +
> > + return sizeof(int);
> > +}
Olaf,

I will make the changes in the next version of this patch.

Thank you,

K. Y
\
 
 \ /
  Last update: 2014-01-16 17:41    [W:0.140 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site