From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@steeleye.com>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Bolke de Bruin <bdbruin@aub.nl>
Subject: [PATCH 2.6.13-rc6] remove 2.4 compat code from cpqfcTS driver, take 2
Date: Tue, 16 Aug 2005 16:28:07 +0200 [thread overview]
Message-ID: <200508161628.09474@bilbo.math.uni-mannheim.de> (raw)
In-Reply-To: <200508161112.47120@bilbo.math.uni-mannheim.de>
Remove compat code for Linux 2.4 and earlier. Fixed bug in earlier version
that caused compile error.
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
--- a/drivers/scsi/cpqfcTScontrol.c 2005-08-13 19:00:35.000000000 +0200
+++ b/drivers/scsi/cpqfcTScontrol.c 2005-08-14 11:02:09.000000000 +0200
@@ -28,8 +28,6 @@
Hewlitt Packard Manual Part Number 5968-1083E.
*/
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
-
#include <linux/blkdev.h>
#include <linux/kernel.h>
#include <linux/string.h>
--- a/drivers/scsi/cpqfcTSstructs.h 2005-08-14 11:11:52.000000000 +0200
+++ b/drivers/scsi/cpqfcTSstructs.h 2005-08-14 11:12:54.000000000 +0200
@@ -88,7 +88,6 @@
#define CPQFCTS_CMD_PER_LUN 15 // power of 2 -1, must be >0
#define CPQFCTS_REQ_QUEUE_LEN (TACH_SEST_LEN/2) // must be < TACH_SEST_LEN
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
#ifndef DECLARE_MUTEX_LOCKED
#define DECLARE_MUTEX_LOCKED(sem) struct semaphore sem = MUTEX_LOCKED
#endif
--- a/drivers/scsi/cpqfcTSinit.c 2005-08-14 14:56:41.000000000 +0200
+++ b/drivers/scsi/cpqfcTSinit.c 2005-08-14 14:57:27.000000000 +0200
@@ -29,8 +29,6 @@
*/
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
-
#include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/module.h>
@@ -72,31 +70,10 @@ int cpqfcTS_TargetDeviceReset( Scsi_Devi
// few fields...
// NOTE: proc_fs changes in 2.4 kernel
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
-static struct proc_dir_entry proc_scsi_cpqfcTS =
-{
- PROC_SCSI_CPQFCTS, // ushort low_ino (enumerated list)
- 7, // ushort namelen
- DEV_NAME, // const char* name
- S_IFDIR | S_IRUGO | S_IXUGO, // mode_t mode
- 2 // nlink_t nlink
- // etc. ...
-};
-
-
-#endif
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,7)
-# define CPQFC_DECLARE_COMPLETION(x) DECLARE_COMPLETION(x)
-# define CPQFC_WAITING waiting
-# define CPQFC_COMPLETE(x) complete(x)
-# define CPQFC_WAIT_FOR_COMPLETION(x) wait_for_completion(x);
-#else
-# define CPQFC_DECLARE_COMPLETION(x) DECLARE_MUTEX_LOCKED(x)
-# define CPQFC_WAITING sem
-# define CPQFC_COMPLETE(x) up(x)
-# define CPQFC_WAIT_FOR_COMPLETION(x) down(x)
-#endif
+#define CPQFC_DECLARE_COMPLETION(x) DECLARE_COMPLETION(x)
+#define CPQFC_WAITING waiting
+#define CPQFC_COMPLETE(x) complete(x)
+#define CPQFC_WAIT_FOR_COMPLETION(x) wait_for_completion(x);
static int cpqfc_alloc_private_data_pool(CPQFCHBA *hba);
@@ -284,12 +261,6 @@ int cpqfcTS_detect(Scsi_Host_Template *S
ENTER("cpqfcTS_detect");
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27)
- ScsiHostTemplate->proc_dir = &proc_scsi_cpqfcTS;
-#else
- ScsiHostTemplate->proc_name = "cpqfcTS";
-#endif
-
for(i = 0; cpqfc_boards[i]; i++) {
while((PciDev = pci_get_device(cpqfc_boards[i].vendor,
cpqfc_boards[i].device, PciDev))) {
@@ -2059,6 +2030,7 @@ void* fcMemManager( struct pci_dev *pdev
static Scsi_Host_Template driver_template = {
+ .proc_name = DEV_NAME,
.detect = cpqfcTS_detect,
.release = cpqfcTS_release,
.info = cpqfcTS_info,
next prev parent reply other threads:[~2005-08-16 14:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 10:02 [PATCH 2.6.13-rc5] reduce whitespace bloat in drivers/scsi/cpqfcTScontrol.c Rolf Eike Beer
2005-08-09 16:06 ` [PATCH 2.6.13-rc5] rewrite drivers/scsi/cpqfcTScontrol.c::CpqTsGetSFQEntry Rolf Eike Beer
2005-08-16 9:11 ` [PATCH 2.6.13-rc6] remove dead reset function from cpqfcTS driver Rolf Eike Beer
2005-08-16 9:11 ` [PATCH 2.6.13-rc6] MODULE_DEVICE_TABLE for " Rolf Eike Beer
2005-08-16 9:12 ` [PATCH 2.6.13-rc6] remove 2.4 compat code from " Rolf Eike Beer
2005-08-16 9:13 ` [PATCH 2.6.13-rc6] more whitespace cleanups for cpqfcTS Rolf Eike Beer
2005-08-16 9:14 ` [PATCH 2.6.13-rc6] remove superfluos ioctls from cpqfcTS Rolf Eike Beer
2005-08-16 14:58 ` [PATCH 2.6.13-rc6] improve start/stop code for worker thread in cpqfcTS driver Rolf Eike Beer
2005-08-16 16:20 ` [PATCH 2.6.13-rc6] improve start/stop code for worker thread in cpqfcTS driver, take 2 Rolf Eike Beer
2005-08-16 16:24 ` Christoph Hellwig
2005-08-16 17:09 ` [PATCH 2.6.13-rc6] improve start/stop code for worker thread in cpqfcTS driver, take 3 Rolf Eike Beer
2005-08-16 14:28 ` Rolf Eike Beer [this message]
2005-08-16 14:51 ` [PATCH 2.6.13-rc6] remove 2.4 compat code from " Rolf Eike Beer
2005-08-16 12:53 ` [PATCH 2.6.13-rc6] MODULE_DEVICE_TABLE for cpqfcTS driver Jiri Slaby
2005-08-16 13:57 ` Rolf Eike Beer
2005-08-16 14:36 ` [PATCH 2.6.13-rc6] MODULE_DEVICE_TABLE for cpqfcTS driver, take 2 Rolf Eike Beer
2005-08-16 9:17 ` [PATCH 2.6.13-rc6] remove dead reset function from cpqfcTS driver Christoph Hellwig
2005-08-16 9:37 ` Rolf Eike Beer
2005-08-16 14:49 ` Martin K. Petersen
2005-08-16 15:07 ` Rolf Eike Beer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200508161628.09474@bilbo.math.uni-mannheim.de \
--to=eike-kernel@sf-tec.de \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=bdbruin@aub.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox