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] [PATCH] xen: use less generic names in netfront driver.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen: use less generic names in netfront driver.
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 4 Dec 2009 16:10:53 +0000
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 04 Dec 2009 08:11:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1259943018.23698.16496.camel@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1259943018.23698.16496.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
All Xen frontend drivers have a couple of identically named functions which
makes figuring out which device went wrong from a stacktrace harder than it
needs to be. Rename them to something specificto the device type.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 drivers/net/xen-netfront.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 9b1cd57..64cf31e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1276,7 +1276,7 @@ static void xennet_disconnect_backend(struct 
netfront_info *info)
 static int netfront_resume(struct xenbus_device *dev)
 {
        struct netfront_info *info = dev_get_drvdata(&dev->dev);
-
+       return 0;
        dev_dbg(&dev->dev, "%s\n", dev->nodename);
 
        xennet_disconnect_backend(info);
@@ -1393,7 +1393,7 @@ static int setup_netfront(struct xenbus_device *dev, 
struct netfront_info *info)
 }
 
 /* Common code used when first setting up, and when resuming. */
-static int talk_to_backend(struct xenbus_device *dev,
+static int talk_to_netback(struct xenbus_device *dev,
                           struct netfront_info *info)
 {
        const char *message;
@@ -1543,7 +1543,7 @@ static int xennet_connect(struct net_device *dev)
                return -ENODEV;
        }
 
-       err = talk_to_backend(np->xbdev, np);
+       err = talk_to_netback(np->xbdev, np);
        if (err)
                return err;
 
@@ -1597,7 +1597,7 @@ static int xennet_connect(struct net_device *dev)
 /**
  * Callback received when the backend's state changes.
  */
-static void backend_changed(struct xenbus_device *dev,
+static void netback_changed(struct xenbus_device *dev,
                            enum xenbus_state backend_state)
 {
        struct netfront_info *np = dev_get_drvdata(&dev->dev);
@@ -1800,7 +1800,7 @@ static struct xenbus_driver netfront_driver = {
        .probe = netfront_probe,
        .remove = __devexit_p(xennet_remove),
        .resume = netfront_resume,
-       .otherend_changed = backend_changed,
+       .otherend_changed = netback_changed,
 };
 
 static int __init netif_init(void)
-- 
1.5.6.5


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