lkml.org 
[lkml]   [2015]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/6] hv:scsi:Untangle the storage protocol negotiation from the vmbus protocol negotiation.
Date


> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Monday, June 1, 2015 3:43 AM
> To: KY Srinivasan
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; ohering@suse.com;
> jbottomley@parallels.com; hch@infradead.org; linux-scsi@vger.kernel.org;
> apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com; Keith
> Mange
> Subject: Re: [PATCH 3/6] hv:scsi:Untangle the storage protocol negotiation
> from the vmbus protocol negotiation.
>
> On Fri, May 29, 2015 at 01:29:16PM -0700, K. Y. Srinivasan wrote:
> > - if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO
> ||
> > - vstor_packet->status != 0)
> > + if (vstor_packet->status != 0) {
> > + ret = -EINVAL;
> > goto cleanup;
> > + }
>
> There is not actually any cleanup, goto cleanup is just a do-nothing
> goto.
>
> In the original code, we returned success here. That always looked like
> a "forgot to set the error code" bug to me, but do-nothing labels always
> introduce ambiguous looking "forgot to set the error code" bugs so I can
> never be positive.
>
> Could you take a look at the other "goto cleanup;" places in this
> function and maybe add a comment, change it to something more clear like
> "return 0;" or fix the error code?

Thanks Dan; will do.

K. Y
>
> regards,
> dan carpenter



\
 
 \ /
  Last update: 2015-06-01 21:41    [W:0.065 / U:0.192 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site