Skip to contentSkip to conversation

drivers/scsi/dpti.h: remove kernel 2.2 #if's

PATCH In review Adrian Bunk 2 participants 3 messages Mar 27, 2005 – Apr 15, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/dpti.h: remove kernel 2.2 #if's

This patch removes #if's for kernel 2.2 .

---

This patch was already sent on:
- 12 Mar 2005

 drivers/scsi/dpti.h |   10 ----------
 1 files changed, 10 deletions(-)
drivers/scsi/dpti.h renamed from drivers/scsi/dpti.h.old +0 -10
@@ -20,15 +20,9 @@
 #ifndef _DPT_H
 #define _DPT_H
 
-#ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
-#endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,00)
-#define MAX_TO_IOP_MESSAGES   (210)
-#else
 #define MAX_TO_IOP_MESSAGES   (255)
-#endif
 #define MAX_FROM_IOP_MESSAGES (255)
 
 
@@ -321,10 +313,6 @@
 static void adpt_delay(int millisec);
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-static struct pci_dev* adpt_pci_find_device(uint vendor, struct pci_dev* from);
-#endif
-
 #if defined __ia64__ 
 static void adpt_ia64_info(sysInfo_S* si);
 #endif
#1 lore raw
Quoted 1 line · Adrian Bunk

This patch removes #if's for kernel 2.2 .

this one looks like it's not quite complete:

drivers/scsi/dpti.h line 25

Quoted 3 lines
drivers/scsi/dpti.h renamed from drivers/scsi/dpti.h.old +0 -2
-#ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
-#endif

Once there are no more KERNEL_VERSION dependencies in a file, it's inclusion of linux/version.h can be removed also (and that should prevent it getting rebuilt every time the kernel version changes).

So it looks like there's an additional KERNEL_VERSION to remove in dpt/dpti_i2o.h version.h includes in dpti_i2o.h and dpt_i2o.c

Then when you have a final patch, could you cc Markus Lidel <[email protected]> and

[email protected]

Thanks,

James

#2 lore raw

PATCH 1/1 drivers/scsi/dpt*: remove version.h dependencies

Quoted 13 lines · James Bottomley
Quoted 1 line · Adrian Bunk

This patch removes #if's for kernel 2.2 .

this one looks like it's not quite complete:

Review

Quoted 3 lines
(quoted diff) +0 -2
-#ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
-#endif

Once there are no more KERNEL_VERSION dependencies in a file, it's inclusion of linux/version.h can be removed also (and that should prevent it getting rebuilt every time the kernel version changes).

Quoted 2 lines

So it looks like there's an additional KERNEL_VERSION to remove in dpt/dpti_i2o.h version.h includes in dpti_i2o.h and dpt_i2o.c

Is the patch below what you want, or do I misunderstand your comment?

Quoted 8 lines

Then when you have a final patch, could you cc Markus Lidel <[email protected]> and

[email protected]

Thanks,

James

cu
Adrian

<-- snip -->

This patch removes version.h dependencies.

 drivers/scsi/dpt/sys_info.h |    4 ----
 drivers/scsi/dpt_i2o.c      |    5 -----
 drivers/scsi/dpti.h         |   12 ------------
 3 files changed, 21 deletions(-)
drivers/scsi/dpti.h renamed from drivers/scsi/dpti.h.old +0 -12
@@ -20,15 +20,7 @@
 #ifndef _DPT_H
 #define _DPT_H
 
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,00)
-#define MAX_TO_IOP_MESSAGES   (210)
-#else
 #define MAX_TO_IOP_MESSAGES   (255)
-#endif
 #define MAX_FROM_IOP_MESSAGES (255)
 
 
@@ -321,10 +313,6 @@
 static void adpt_delay(int millisec);
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-static struct pci_dev* adpt_pci_find_device(uint vendor, struct pci_dev* from);
-#endif
-
 #if defined __ia64__ 
 static void adpt_ia64_info(sysInfo_S* si);
 #endif
drivers/scsi/dpt/sys_info.h renamed from drivers/scsi/dpt/sys_info.h.old +0 -4
@@ -146,10 +146,6 @@
    uSHORT       flags;                  /* See bit definitions above */
    uSHORT       conventionalMemSize;    /* in KB */
    uLONG        extendedMemSize;        /* in KB */
-   uLONG        osType;                 /* Same as DPTSIG's definition */
-   uCHAR        osMajorVersion;
-   uCHAR        osMinorVersion;         /* The OS version */
-   uCHAR        osRevision;
 #ifdef _SINIX_ADDON
    uCHAR        busType;                /* See defininitions above */
    uSHORT       osSubRevision;
drivers/scsi/dpt_i2o.c renamed from drivers/scsi/dpt_i2o.c.old +0 -5
@@ -34,7 +34,6 @@
 
 #define ADDR32 (0)
 
-#include <linux/version.h>
 #include <linux/module.h>
 
 MODULE_AUTHOR("Deanna Bonds, with _lots_ of help from Mark Salyzyn");
@@ -1824,10 +1823,6 @@
 
 	memset(&si, 0, sizeof(si));
 
-	si.osType = OS_LINUX;
-	si.osMajorVersion = (u8) (LINUX_VERSION_CODE >> 16);
-	si.osMinorVersion = (u8) (LINUX_VERSION_CODE >> 8 & 0x0ff);
-	si.osRevision =     (u8) (LINUX_VERSION_CODE & 0x0ff);
 	si.busType = SI_PCI_BUS;
 	si.processorFamily = DPTI_sig.dsProcessorFamily;