* [GIT] Rename frontend functions to be unique
@ 2009-12-04 16:10 Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront driver Ian Campbell
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ian Campbell @ 2009-12-04 16:10 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel
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.
The following changes since commit 167bafd71a448f50dba5db362b813029838d04c9:
Jeremy Fitzhardinge (1):
Merge branch 'xen/dom0/apic' into xen/master
are available in the git repository at:
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/rollup
or individually from
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/netfront
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/blkfront
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/netchannel2
Ian Campbell (3):
xen: use less generic names in netfront driver.
xen: use less generic names in blkfront driver.
xen: use less generic names in netfront2 driver.
drivers/block/xen-blkfront.c | 12 ++++++------
drivers/net/xen-netchannel2/netfront2.c | 4 ++--
drivers/net/xen-netfront.c | 10 +++++-----
3 files changed, 13 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] xen: use less generic names in netfront driver.
2009-12-04 16:10 [GIT] Rename frontend functions to be unique Ian Campbell
@ 2009-12-04 16:10 ` Ian Campbell
2009-12-04 16:14 ` Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in blkfront driver Ian Campbell
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2009-12-04 16:10 UTC (permalink / raw)
To: xen-devel; +Cc: Jeremy Fitzhardinge, Ian Campbell
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@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] xen: use less generic names in blkfront driver.
2009-12-04 16:10 [GIT] Rename frontend functions to be unique Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront driver Ian Campbell
@ 2009-12-04 16:10 ` Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront2 driver Ian Campbell
2009-12-04 16:41 ` [GIT] Rename frontend functions to be unique Jeremy Fitzhardinge
3 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2009-12-04 16:10 UTC (permalink / raw)
To: xen-devel; +Cc: Jeremy Fitzhardinge, Ian Campbell
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@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/block/xen-blkfront.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9aff0f5..837b992 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -650,7 +650,7 @@ fail:
/* Common code used when first setting up, and when resuming. */
-static int talk_to_backend(struct xenbus_device *dev,
+static int talk_to_blkback(struct xenbus_device *dev,
struct blkfront_info *info)
{
const char *message = NULL;
@@ -755,7 +755,7 @@ static int blkfront_probe(struct xenbus_device *dev,
info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0);
dev_set_drvdata(&dev->dev, info);
- err = talk_to_backend(dev, info);
+ err = talk_to_blkback(dev, info);
if (err) {
kfree(info);
dev_set_drvdata(&dev->dev, NULL);
@@ -850,7 +850,7 @@ static int blkfront_resume(struct xenbus_device *dev)
blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
- err = talk_to_backend(dev, info);
+ err = talk_to_blkback(dev, info);
if (info->connected == BLKIF_STATE_SUSPENDED && !err)
err = blkif_recover(info);
@@ -954,13 +954,13 @@ static void blkfront_closing(struct xenbus_device *dev)
/**
* Callback received when the backend's state changes.
*/
-static void backend_changed(struct xenbus_device *dev,
+static void blkback_changed(struct xenbus_device *dev,
enum xenbus_state backend_state)
{
struct blkfront_info *info = dev_get_drvdata(&dev->dev);
struct block_device *bd;
- dev_dbg(&dev->dev, "blkfront:backend_changed.\n");
+ dev_dbg(&dev->dev, "blkfront:blkback_changed to state %d.\n", backend_state);
switch (backend_state) {
case XenbusStateInitialising:
@@ -1063,7 +1063,7 @@ static struct xenbus_driver blkfront = {
.probe = blkfront_probe,
.remove = blkfront_remove,
.resume = blkfront_resume,
- .otherend_changed = backend_changed,
+ .otherend_changed = blkback_changed,
.is_ready = blkfront_is_ready,
};
--
1.5.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] xen: use less generic names in netfront2 driver.
2009-12-04 16:10 [GIT] Rename frontend functions to be unique Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront driver Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in blkfront driver Ian Campbell
@ 2009-12-04 16:10 ` Ian Campbell
2009-12-04 16:41 ` [GIT] Rename frontend functions to be unique Jeremy Fitzhardinge
3 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2009-12-04 16:10 UTC (permalink / raw)
To: xen-devel; +Cc: Jeremy Fitzhardinge, Ian Campbell
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@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/net/xen-netchannel2/netfront2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netchannel2/netfront2.c b/drivers/net/xen-netchannel2/netfront2.c
index f360b43..d5e12c0 100644
--- a/drivers/net/xen-netchannel2/netfront2.c
+++ b/drivers/net/xen-netchannel2/netfront2.c
@@ -342,7 +342,7 @@ static int allocate_rings(struct netfront2 *nf, domid_t otherend)
return 0;
}
-static void backend_changed(struct xenbus_device *xd,
+static void netback2_changed(struct xenbus_device *xd,
enum xenbus_state backend_state)
{
struct netfront2 *nf = xenbus_device_to_nf2(xd);
@@ -498,7 +498,7 @@ static struct xenbus_driver netfront2 = {
.ids = netfront_ids,
.probe = netfront_probe,
.remove = __devexit_p(netfront_remove),
- .otherend_changed = backend_changed,
+ .otherend_changed = netback2_changed,
.resume = netfront_resume,
.suspend = netfront_suspend,
};
--
1.5.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xen: use less generic names in netfront driver.
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront driver Ian Campbell
@ 2009-12-04 16:14 ` Ian Campbell
2009-12-04 16:34 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2009-12-04 16:14 UTC (permalink / raw)
To: xen-devel@lists.xensource.com; +Cc: Jeremy Fitzhardinge
On Fri, 2009-12-04 at 16:10 +0000, Ian Campbell wrote:
> @@ -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);
Doh, this hunk was obviously accidental. I've updated the git branch.
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xen: use less generic names in netfront driver.
2009-12-04 16:14 ` Ian Campbell
@ 2009-12-04 16:34 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2009-12-04 16:34 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
On 12/04/09 08:14, Ian Campbell wrote:
> On Fri, 2009-12-04 at 16:10 +0000, Ian Campbell wrote:
>
>> @@ -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);
>>
> Doh, this hunk was obviously accidental. I've updated the git branch.
Thanks, I'd picked up the updated one anyway.
J
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT] Rename frontend functions to be unique
2009-12-04 16:10 [GIT] Rename frontend functions to be unique Ian Campbell
` (2 preceding siblings ...)
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront2 driver Ian Campbell
@ 2009-12-04 16:41 ` Jeremy Fitzhardinge
3 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2009-12-04 16:41 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
On 12/04/09 08:10, Ian Campbell wrote:
> or individually from
> git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/netfront
> git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/blkfront
> git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/netchannel2
>
BTW, I have a single xen/frontend branch for netfront and blkfront, on
the assumption that changes to them are going to be minor bugfix type
stuff. I cherry-picked your patches over to it.
J
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-04 16:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 16:10 [GIT] Rename frontend functions to be unique Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront driver Ian Campbell
2009-12-04 16:14 ` Ian Campbell
2009-12-04 16:34 ` Jeremy Fitzhardinge
2009-12-04 16:10 ` [PATCH] xen: use less generic names in blkfront driver Ian Campbell
2009-12-04 16:10 ` [PATCH] xen: use less generic names in netfront2 driver Ian Campbell
2009-12-04 16:41 ` [GIT] Rename frontend functions to be unique Jeremy Fitzhardinge
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.