WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: linux c/s 437

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: [Xen-devel] Re: linux c/s 437
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Tue, 11 Mar 2008 09:36:07 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 10 Mar 2008 17:36:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47D55EE4.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47D55EE4.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Jan Beulich wrote:
This changeset added pcifront_{at,de}tach_devices() to
drivers/xen/pcifront/xenbus.c, the two functions, however, return
inconsistent/bogus return values, but their only caller doesn't care:
Depending on the compiler version, the case of
pcifront_detach_devices() leaving 'err' uninitialized may get warned
about, and pcifront_attach_devices() would return -EFAULT if called
in the wrong state.

However, given the return values aren't used I'm really uncertain
whether to just make the functions return 'void' or whether to fix the
error values. Please advise.

It seems I didn't have much consideration on error values of
these functions when I implemented them ...
I think it would be reasonable to make pcifront_{at,de}tache_devices() return 'void' and keep the caller pcifront_backend_changed() as is.

BTW, pcifront_try_{dis,}connect() also have return values which are not
handled by their only caller. I'm not certain about them, but probably
we had better let these functions have 'void' return type as well.

Thanks,
  Yosuke Iwamatsu



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>