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

[Xen-devel] [PATCH] linux-2.6.18/backends: remove version specific code



Backends, other than frontends and come parts of core code, aren't
meant to be built against multiple Linux versions (and they wouldn't
really build anyway), so remove the code dealing with this case.

This really is mostly the removal of pointless inclusions of
linux/version.h, but in the case of blktap also includes some dead
code.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/drivers/xen/blkback/common.h
+++ b/drivers/xen/blkback/common.h
@@ -27,7 +27,6 @@
 #ifndef __BLKIF__BACKEND__COMMON_H__
 #define __BLKIF__BACKEND__COMMON_H__
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
--- a/drivers/xen/blktap/common.h
+++ b/drivers/xen/blktap/common.h
@@ -27,7 +27,6 @@
 #ifndef __BLKIF__BACKEND__COMMON_H__
 #define __BLKIF__BACKEND__COMMON_H__
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
--- a/drivers/xen/blktap2/device.c
+++ b/drivers/xen/blktap2/device.c
@@ -93,27 +93,6 @@ blktap_device_ioctl(struct inode *inode,
                      command, (long)argument, inode->i_rdev);
 
        switch (command) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
-       case HDIO_GETGEO: {
-               struct block_device *bd = inode->i_bdev;
-               struct hd_geometry geo;
-               int ret;
-
-                if (!argument)
-                        return -EINVAL;
-
-               geo.start = get_start_sect(bd);
-               ret = blktap_device_getgeo(bd, &geo);
-               if (ret)
-                       return ret;
-
-               if (copy_to_user((struct hd_geometry __user *)argument, &geo,
-                                sizeof(geo)))
-                        return -EFAULT;
-
-                return 0;
-       }
-#endif
        case CDROMMULTISESSION:
                BTDBG("FIXME: support multisession CDs later\n");
                for (i = 0; i < sizeof(struct cdrom_multisession); i++)
@@ -146,9 +125,7 @@ static struct block_device_operations bl
        .open      = blktap_device_open,
        .release   = blktap_device_release,
        .ioctl     = blktap_device_ioctl,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
        .getgeo    = blktap_device_getgeo
-#endif
 };
 
 static int
@@ -1135,11 +1112,7 @@ blktap_device_create(struct blktap *tap)
        if (!rq)
                goto error;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
        elevator_init(rq, "noop");
-#else
-       elevator_init(rq, &elevator_noop);
-#endif
 
        gd->queue     = rq;
        rq->queuedata = dev;
--- a/drivers/xen/netback/common.h
+++ b/drivers/xen/netback/common.h
@@ -29,7 +29,6 @@
 #ifndef __NETIF__BACKEND__COMMON_H__
 #define __NETIF__BACKEND__COMMON_H__
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
--- a/drivers/xen/pcifront/pci_op.c
+++ b/drivers/xen/pcifront/pci_op.c
@@ -4,7 +4,6 @@
  *   Author: Ryan Wilson <hap9@xxxxxxxxxxxxxx>
  */
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
--- a/drivers/xen/scsiback/common.h
+++ b/drivers/xen/scsiback/common.h
@@ -31,7 +31,6 @@
 #ifndef __SCSIIF__BACKEND__COMMON_H__
 #define __SCSIIF__BACKEND__COMMON_H__
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
--- a/drivers/xen/tpmback/common.h
+++ b/drivers/xen/tpmback/common.h
@@ -5,7 +5,6 @@
 #ifndef __TPM__BACKEND__COMMON_H__
 #define __TPM__BACKEND__COMMON_H__
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>



Attachment: xen-no-linux-version.patch
Description: Text document

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.