Skip to contentSkip to conversation

Trivial patch: blkfront C99 warnings about mixing declarations and code

PATCH Tobias Hunger 1 participant 1 message Nov 14, 2005

lore
Share & tools
lore
#0 lore raw

Hi!

Here is another trivial fix. This time about compile time warnings in blkfront.c

Regards,
Tobias

linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +4 -3
diff -urN orig/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c patched/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
@@ -293,13 +293,14 @@
 {
 	unsigned long sectors, sector_size;
 	unsigned int binfo;
+	int err;
 
         if (info->connected == BLKIF_STATE_CONNECTED)
 		return;
 
 	DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 
-	int err = xenbus_gather(NULL, info->xbdev->otherend,
+	err = xenbus_gather(NULL, info->xbdev->otherend,
 				"sectors", "%lu", &sectors,
 				"info", "%u", &binfo,
 				"sector-size", "%lu", &sector_size,
@@ -349,10 +350,10 @@
 
 static int blkfront_remove(struct xenbus_device *dev)
 {
-	DPRINTK("blkfront_remove: %s removed\n", dev->nodename);
-
 	struct blkfront_info *info = dev->data;
 
+	DPRINTK("blkfront_remove: %s removed\n", dev->nodename);
+
 	blkif_free(info);
 
 	kfree(info);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel