diff options
author | Frederik Deweerdt <deweerdt@free.fr> | 2006-10-05 16:49:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 18:49:02 -0400 |
commit | d7a297baa6edea94167163bed808c6a8933bd5aa (patch) | |
tree | b703dc50266304765eaa14753a5ba4616d340199 | |
parent | d223a60106891bfe46febfacf46b20cd8509aaad (diff) |
[PATCH] fix qla{2,4} build error
commit 0181944fe647cae18d545ac1167df3d15d393701 adds a
'extended_error_logging' global variable to qla2xxx which is defined by
qla4xxx too.
Trying to build both drivers results in the following error:
LD drivers/scsi/built-in.o
drivers/scsi/qla4xxx/built-in.o: In function `qla4xxx_slave_configure':
drivers/scsi/qla4xxx/ql4_os.c:1433: multiple definition of `extended_error_logging'
drivers/scsi/qla2xxx/built-in.o:drivers/scsi/qla2xxx/qla_os.c:2166:
first defined here
make[2]: *** [drivers/scsi/built-in.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
The following patch simply adds a qla2_ (qla4_ respectively) prefix to
the variable name.
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.h | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 8 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_dbg.h | 4 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_glbl.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 8 |
8 files changed, 21 insertions, 21 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index 533425338e05..90dad7e88985 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h | |||
@@ -38,7 +38,7 @@ | |||
38 | * Macros use for debugging the driver. | 38 | * Macros use for debugging the driver. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #define DEBUG(x) do { if (extended_error_logging) { x; } } while (0) | 41 | #define DEBUG(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
42 | 42 | ||
43 | #if defined(QL_DEBUG_LEVEL_1) | 43 | #if defined(QL_DEBUG_LEVEL_1) |
44 | #define DEBUG1(x) do {x;} while (0) | 44 | #define DEBUG1(x) do {x;} while (0) |
@@ -46,12 +46,12 @@ | |||
46 | #define DEBUG1(x) do {} while (0) | 46 | #define DEBUG1(x) do {} while (0) |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #define DEBUG2(x) do { if (extended_error_logging) { x; } } while (0) | 49 | #define DEBUG2(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
50 | #define DEBUG2_3(x) do { if (extended_error_logging) { x; } } while (0) | 50 | #define DEBUG2_3(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
51 | #define DEBUG2_3_11(x) do { if (extended_error_logging) { x; } } while (0) | 51 | #define DEBUG2_3_11(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
52 | #define DEBUG2_9_10(x) do { if (extended_error_logging) { x; } } while (0) | 52 | #define DEBUG2_9_10(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
53 | #define DEBUG2_11(x) do { if (extended_error_logging) { x; } } while (0) | 53 | #define DEBUG2_11(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
54 | #define DEBUG2_13(x) do { if (extended_error_logging) { x; } } while (0) | 54 | #define DEBUG2_13(x) do { if (qla2_extended_error_logging) { x; } } while (0) |
55 | 55 | ||
56 | #if defined(QL_DEBUG_LEVEL_3) | 56 | #if defined(QL_DEBUG_LEVEL_3) |
57 | #define DEBUG3(x) do {x;} while (0) | 57 | #define DEBUG3(x) do {x;} while (0) |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index bef7011378c6..990b897560cc 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -60,7 +60,7 @@ extern int ql2xplogiabsentdevice; | |||
60 | extern int ql2xloginretrycount; | 60 | extern int ql2xloginretrycount; |
61 | extern int ql2xfdmienable; | 61 | extern int ql2xfdmienable; |
62 | extern int ql2xallocfwdump; | 62 | extern int ql2xallocfwdump; |
63 | extern int extended_error_logging; | 63 | extern int qla2_extended_error_logging; |
64 | 64 | ||
65 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); | 65 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); |
66 | 66 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d5d26273c04e..833b93085fd3 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1644,7 +1644,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1644 | * Set host adapter parameters. | 1644 | * Set host adapter parameters. |
1645 | */ | 1645 | */ |
1646 | if (nv->host_p[0] & BIT_7) | 1646 | if (nv->host_p[0] & BIT_7) |
1647 | extended_error_logging = 1; | 1647 | qla2_extended_error_logging = 1; |
1648 | ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); | 1648 | ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); |
1649 | /* Always load RISC code on non ISP2[12]00 chips. */ | 1649 | /* Always load RISC code on non ISP2[12]00 chips. */ |
1650 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) | 1650 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3ba8c239f171..3f20d765563e 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -61,9 +61,9 @@ MODULE_PARM_DESC(ql2xallocfwdump, | |||
61 | "during HBA initialization. Memory allocation requirements " | 61 | "during HBA initialization. Memory allocation requirements " |
62 | "vary by ISP type. Default is 1 - allocate memory."); | 62 | "vary by ISP type. Default is 1 - allocate memory."); |
63 | 63 | ||
64 | int extended_error_logging; | 64 | int qla2_extended_error_logging; |
65 | module_param(extended_error_logging, int, S_IRUGO|S_IRUSR); | 65 | module_param(qla2_extended_error_logging, int, S_IRUGO|S_IRUSR); |
66 | MODULE_PARM_DESC(extended_error_logging, | 66 | MODULE_PARM_DESC(qla2_extended_error_logging, |
67 | "Option to enable extended error logging, " | 67 | "Option to enable extended error logging, " |
68 | "Default is 0 - no logging. 1 - log errors."); | 68 | "Default is 0 - no logging. 1 - log errors."); |
69 | 69 | ||
@@ -2697,7 +2697,7 @@ qla2x00_module_init(void) | |||
2697 | 2697 | ||
2698 | /* Derive version string. */ | 2698 | /* Derive version string. */ |
2699 | strcpy(qla2x00_version_str, QLA2XXX_VERSION); | 2699 | strcpy(qla2x00_version_str, QLA2XXX_VERSION); |
2700 | if (extended_error_logging) | 2700 | if (qla2_extended_error_logging) |
2701 | strcat(qla2x00_version_str, "-debug"); | 2701 | strcat(qla2x00_version_str, "-debug"); |
2702 | 2702 | ||
2703 | qla2xxx_transport_template = | 2703 | qla2xxx_transport_template = |
diff --git a/drivers/scsi/qla4xxx/ql4_dbg.h b/drivers/scsi/qla4xxx/ql4_dbg.h index 56ddc227f846..3e99dcfd5a9f 100644 --- a/drivers/scsi/qla4xxx/ql4_dbg.h +++ b/drivers/scsi/qla4xxx/ql4_dbg.h | |||
@@ -22,14 +22,14 @@ | |||
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #if defined(QL_DEBUG_LEVEL_2) | 24 | #if defined(QL_DEBUG_LEVEL_2) |
25 | #define DEBUG2(x) do {if(extended_error_logging == 2) x;} while (0); | 25 | #define DEBUG2(x) do {if(qla4_extended_error_logging == 2) x;} while (0); |
26 | #define DEBUG2_3(x) do {x;} while (0); | 26 | #define DEBUG2_3(x) do {x;} while (0); |
27 | #else /* */ | 27 | #else /* */ |
28 | #define DEBUG2(x) do {} while (0); | 28 | #define DEBUG2(x) do {} while (0); |
29 | #endif /* */ | 29 | #endif /* */ |
30 | 30 | ||
31 | #if defined(QL_DEBUG_LEVEL_3) | 31 | #if defined(QL_DEBUG_LEVEL_3) |
32 | #define DEBUG3(x) do {if(extended_error_logging == 3) x;} while (0); | 32 | #define DEBUG3(x) do {if(qla4_extended_error_logging == 3) x;} while (0); |
33 | #else /* */ | 33 | #else /* */ |
34 | #define DEBUG3(x) do {} while (0); | 34 | #define DEBUG3(x) do {} while (0); |
35 | #if !defined(QL_DEBUG_LEVEL_2) | 35 | #if !defined(QL_DEBUG_LEVEL_2) |
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h index 418fb7a13a65..77a997a82cbb 100644 --- a/drivers/scsi/qla4xxx/ql4_glbl.h +++ b/drivers/scsi/qla4xxx/ql4_glbl.h | |||
@@ -72,7 +72,7 @@ int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); | |||
72 | int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha, | 72 | int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha, |
73 | uint32_t fw_ddb_index, uint32_t state); | 73 | uint32_t fw_ddb_index, uint32_t state); |
74 | 74 | ||
75 | extern int extended_error_logging; | 75 | extern int qla4_extended_error_logging; |
76 | extern int ql4xdiscoverywait; | 76 | extern int ql4xdiscoverywait; |
77 | extern int ql4xdontresethba; | 77 | extern int ql4xdontresethba; |
78 | #endif /* _QLA4x_GBL_H */ | 78 | #endif /* _QLA4x_GBL_H */ |
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index ed977f70b2db..ef82399c0858 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c | |||
@@ -701,7 +701,7 @@ void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha) | |||
701 | DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n", | 701 | DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n", |
702 | ha->host_no, num_valid_entries)); | 702 | ha->host_no, num_valid_entries)); |
703 | 703 | ||
704 | if (extended_error_logging == 3) { | 704 | if (qla4_extended_error_logging == 3) { |
705 | if (oldest_entry == 0) { | 705 | if (oldest_entry == 0) { |
706 | /* Circular Buffer has not wrapped around */ | 706 | /* Circular Buffer has not wrapped around */ |
707 | for (i=0; i < num_valid_entries; i++) { | 707 | for (i=0; i < num_valid_entries; i++) { |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 5036ebf013a5..178fcddcfd81 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -34,9 +34,9 @@ MODULE_PARM_DESC(ql4xdontresethba, | |||
34 | " default it will reset hba :0" | 34 | " default it will reset hba :0" |
35 | " set to 1 to avoid resetting HBA"); | 35 | " set to 1 to avoid resetting HBA"); |
36 | 36 | ||
37 | int extended_error_logging = 0; /* 0 = off, 1 = log errors */ | 37 | int qla4_extended_error_logging = 0; /* 0 = off, 1 = log errors */ |
38 | module_param(extended_error_logging, int, S_IRUGO | S_IRUSR); | 38 | module_param(qla4_extended_error_logging, int, S_IRUGO | S_IRUSR); |
39 | MODULE_PARM_DESC(extended_error_logging, | 39 | MODULE_PARM_DESC(qla4_extended_error_logging, |
40 | "Option to enable extended error logging, " | 40 | "Option to enable extended error logging, " |
41 | "Default is 0 - no logging, 1 - debug logging"); | 41 | "Default is 0 - no logging, 1 - debug logging"); |
42 | 42 | ||
@@ -1714,7 +1714,7 @@ static int __init qla4xxx_module_init(void) | |||
1714 | 1714 | ||
1715 | /* Derive version string. */ | 1715 | /* Derive version string. */ |
1716 | strcpy(qla4xxx_version_str, QLA4XXX_DRIVER_VERSION); | 1716 | strcpy(qla4xxx_version_str, QLA4XXX_DRIVER_VERSION); |
1717 | if (extended_error_logging) | 1717 | if (qla4_extended_error_logging) |
1718 | strcat(qla4xxx_version_str, "-debug"); | 1718 | strcat(qla4xxx_version_str, "-debug"); |
1719 | 1719 | ||
1720 | qla4xxx_scsi_transport = | 1720 | qla4xxx_scsi_transport = |