public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] SCSI qla1280: some firmware files cleanups
@ 2004-11-15  2:26 Adrian Bunk
  2004-11-15  8:48 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2004-11-15  2:26 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel

The patch below does the following changes to the qla1280 firmware 
files:
- make all this needlessly global code static
- remove the unused firmware_version variables


diffstat output:
 drivers/scsi/ql1040_fw.h  |   10 ++++------
 drivers/scsi/ql12160_fw.h |   22 ++++++++--------------
 drivers/scsi/ql1280_fw.h  |   22 ++++++++--------------
 3 files changed, 20 insertions(+), 34 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc1-mm5-full/drivers/scsi/ql1040_fw.h.old	2004-11-13 22:51:55.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/ql1040_fw.h	2004-11-13 23:13:12.000000000 +0100
@@ -28,15 +28,13 @@
  *	Firmware Version 7.65.00 (14:17 Jul 20, 1999)
  */
 
-unsigned short risc_code_version = 7*1024+65;
-
-unsigned char firmware_version[] = {7,65,0};
+static unsigned char firmware_version[] = {7,65,0};
 
 #define FW_VERSION_STRING "7.65.0"
 
-unsigned short risc_code_addr01 = 0x1000 ;
+static unsigned short risc_code_addr01 = 0x1000 ;
 
-unsigned short risc_code01[] = { 
+static unsigned short risc_code01[] = { 
 	0x0078, 0x103a, 0x0000, 0x4057, 0x0000, 0x2043, 0x4f50, 0x5952,
 	0x4947, 0x4854, 0x2031, 0x3939, 0x3520, 0x514c, 0x4f47, 0x4943,
 	0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350,
@@ -2097,5 +2095,5 @@
 	0x0014, 0x878e, 0x0016, 0xa21c, 0x1035, 0xa8af, 0xa210, 0x3807,
 	0x300c, 0x817e, 0x872b, 0x8772, 0xa8a8, 0x0000, 0xdf21
 };
-unsigned short   risc_code_length01 = 0x4057;
+static unsigned short   risc_code_length01 = 0x4057;
 
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/ql1280_fw.h.old	2004-11-13 22:51:43.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/ql1280_fw.h	2004-11-13 23:13:07.000000000 +0100
@@ -27,15 +27,9 @@
  */
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw1280ei_version = 8*1024+15;
+static unsigned char fw1280ei_version_str[] = {8,15,0};
 #else
-unsigned short risc_code_version = 8*1024+15;
-#endif
-
-#ifdef UNIQUE_FW_NAME
-unsigned char fw1280ei_version_str[] = {8,15,0};
-#else
-unsigned char firmware_version[] = {8,15,0};
+static unsigned char firmware_version[] = {8,15,0};
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -45,15 +39,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw1280ei_addr01 = 0x1000;
+static unsigned short fw1280ei_addr01 = 0x1000;
 #else
-unsigned short risc_code_addr01 = 0x1000;
+static unsigned short risc_code_addr01 = 0x1000;
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw1280ei_code01[] = {
+static unsigned short fw1280ei_code01[] = {
 #else
-unsigned short risc_code01[] = {
+static unsigned short risc_code01[] = {
 #endif
 	0x0078, 0x1041, 0x0000, 0x3d3b, 0x0000, 0x2043, 0x4f50, 0x5952,
 	0x4947, 0x4854, 0x2031, 0x3939, 0x312c, 0x3139, 0x3932, 0x2c31,
@@ -2017,7 +2011,7 @@
 	0x70a2, 0x007c, 0x205b
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short   fw1280ei_length01 = 0x3d3b;
+static unsigned short   fw1280ei_length01 = 0x3d3b;
 #else
-unsigned short   risc_code_length01 = 0x3d3b;
+static unsigned short   risc_code_length01 = 0x3d3b;
 #endif
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/ql12160_fw.h.old	2004-11-13 22:53:26.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/ql12160_fw.h	2004-11-13 23:13:02.000000000 +0100
@@ -26,15 +26,9 @@
  */
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw12160i_version = 10*1024+4;
+static unsigned char fw12160i_version_str[] = {10,4,32};
 #else
-unsigned short risc_code_version = 10*1024+4;
-#endif
-
-#ifdef UNIQUE_FW_NAME
-unsigned char fw12160i_version_str[] = {10,4,32};
-#else
-unsigned char firmware_version[] = {10,4,32};
+static unsigned char firmware_version[] = {10,4,32};
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -44,15 +38,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw12160i_addr01 = 0x1000;
+static unsigned short fw12160i_addr01 = 0x1000;
 #else
-unsigned short risc_code_addr01 = 0x1000;
+static unsigned short risc_code_addr01 = 0x1000;
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned short fw12160i_code01[] = {
+static unsigned short fw12160i_code01[] = {
 #else
-unsigned short risc_code01[] = {
+static unsigned short risc_code01[] = {
 #endif
 	0x0804, 0x1041, 0x0000, 0x35e6, 0x0000, 0x2043, 0x4f50, 0x5952,
 	0x4947, 0x4854, 0x2031, 0x3939, 0x312c, 0x3139, 0x3932, 0x2c31,
@@ -1781,7 +1775,7 @@
 	0x681f, 0x000c, 0x70a0, 0x70a2, 0x0005, 0x7c12
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short   fw12160i_length01 = 0x35e6;
+static unsigned short   fw12160i_length01 = 0x35e6;
 #else
-unsigned short   risc_code_length01 = 0x35e6;
+static unsigned short   risc_code_length01 = 0x35e6;
 #endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] SCSI qla1280: some firmware files cleanups
  2004-11-15  2:26 [2.6 patch] SCSI qla1280: some firmware files cleanups Adrian Bunk
@ 2004-11-15  8:48 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2004-11-15  8:48 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: James.Bottomley, linux-scsi, linux-kernel

>>>>> "Adrian" == Adrian Bunk <bunk@stusta.de> writes:

Adrian> The patch below does the following changes to the qla1280
Adrian> firmware files: - make all this needlessly global code static
Adrian> - remove the unused firmware_version variables


Looks fine to me, though some of those could maybe even be turned into
#define's.

Cheers,
Jes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-15  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15  2:26 [2.6 patch] SCSI qla1280: some firmware files cleanups Adrian Bunk
2004-11-15  8:48 ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox