RE: [PATCH 10/25] Staging: hv: vmbus: Return proper error code in vmbus_remove()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Greg KH [mailto:gregkh@xxxxxxx]
> Sent: Saturday, September 10, 2011 2:34 PM
> To: KY Srinivasan
> Cc: Greg KH; linux-kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx;
> virtualization@xxxxxxxxxxxxxx; Haiyang Zhang
> Subject: Re: [PATCH 10/25] Staging: hv: vmbus: Return proper error code in
> vmbus_remove()
> 
> On Sat, Sep 10, 2011 at 02:22:22PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:greg@xxxxxxxxx]
> > > Sent: Friday, September 09, 2011 4:43 PM
> > > To: KY Srinivasan
> > > Cc: gregkh@xxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> > > devel@xxxxxxxxxxxxxxxxxxxxxx; virtualization@xxxxxxxxxxxxxx; Haiyang Zhang
> > > Subject: Re: [PATCH 10/25] Staging: hv: vmbus: Return proper error code in
> > > vmbus_remove()
> > >
> > > On Thu, Sep 08, 2011 at 07:24:21AM -0700, K. Y. Srinivasan wrote:
> > > > Return proper error code in vmbus_remove().
> > > >
> > > > Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> > > > Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> > > > ---
> > > >  drivers/staging/hv/vmbus_drv.c |    4 ++--
> > > >  1 files changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/hv/vmbus_drv.c
> b/drivers/staging/hv/vmbus_drv.c
> > > > index b9aeb76..95d33a4 100644
> > > > --- a/drivers/staging/hv/vmbus_drv.c
> > > > +++ b/drivers/staging/hv/vmbus_drv.c
> > > > @@ -325,7 +325,7 @@ static int vmbus_probe(struct device *child_device)
> > > >   */
> > > >  static int vmbus_remove(struct device *child_device)
> > > >  {
> > > > -	int ret;
> > > > +	int ret = 0;
> > >
> > > As remove functions can't fail, why return anything at all?
> > >
> > > Doesn't make sense, please fix.
> >
> > Greg,
> >
> > Looking at the struct bus_type, the remove function is not a void function.
> 
> Yeah, but it's never checked, and most bus types just use a void
> function as the function can not fail (or, it's not allowed to at
> least.)
> 
> > I was just fixing something that was broken in this function.
> 
> That's fine, then you can add it to the list of things to change :)

Ok; I will do what is done in pci_device_remove().

Regards,

K. Y

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux