Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Luben Tuikov
On 03/01/05 17:17, Christoph Hellwig wrote:
Doing it in the core means less duplication and avoiding updating
all drivers.
I agree.
Luben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Christoph Hellwig
On Tue, Mar 01, 2005 at 09:40:48AM -0500, Luben Tuikov wrote:
> On 03/01/05 03:14, Douglas Gilbert wrote:
> >>  - scsi_error.c: scsi_normalize_sense
> >
> >
> >I introduced scsi_normalize_sense() recently, Christoph H.
> >proposed it should be static but Luben Tuikov (aic7xxx
> >maintainer) said he wished to use it in the future.
> >Hence it was left global.
> 
> Hi guys,
> 
> I think the idea of normalized sense is very good.
> Basically the question is if LLDD would submit normalized
> sense to SCSI Core or whether they would submit a pointer
> to raw sense data as returned by the device and let SCSI
> Core decipher it.
> 
> If the former, then it should be global, if the latter then
> it should be static to SCSI Core.

Doing it in the core means less duplication and avoiding updating
all drivers.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Luben Tuikov
On 03/01/05 03:14, Douglas Gilbert wrote:
  - scsi_error.c: scsi_normalize_sense

I introduced scsi_normalize_sense() recently, Christoph H.
proposed it should be static but Luben Tuikov (aic7xxx
maintainer) said he wished to use it in the future.
Hence it was left global.
Hi guys,
I think the idea of normalized sense is very good.
Basically the question is if LLDD would submit normalized
sense to SCSI Core or whether they would submit a pointer
to raw sense data as returned by the device and let SCSI
Core decipher it.
If the former, then it should be global, if the latter then
it should be static to SCSI Core.
Luben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Salyzyn, Mark
Christoph Hellwig writes:
>>   - scsi_scan.c: scsi_rescan_device
>aacraid was going to use that one, Mark, any chance to get a patch
anytime soon?
>>   - scsi_scan.c: scsi_scan_single_target
>as mentioned above we'll need this one soon.

Yup, we use both of them in our branch of the driver. I submit a patch
to MarkH for the Hot-Add calls soon.

Sincerely -- Mark Salyzyn

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Douglas Gilbert
Adrian Bunk wrote:
Before I'm getting flamed to death:
Adrian,
I have a few comments below.
This patch contains possible cleanups. If parts of this patch conflict 
with pending changes these parts of my patch have to be dropped.

This patch contains the following possible cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
The names of the above are too general so they should go
as soon as practical.
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
I'm a bit surprised nothing else is using the above two.
  - scsi_scan.c: scsi_scan_single_target
- remove the following unneeded EXPORT_SYMBOL's:
  - constants.c: __scsi_print_sense
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_error.c: scsi_normalize_sense
I introduced scsi_normalize_sense() recently, Christoph H.
proposed it should be static but Luben Tuikov (aic7xxx
maintainer) said he wished to use it in the future.
Hence it was left global.
  - scsi_error.c: scsi_sense_desc_find
A pending patch on st from Kai M. will be using
scsi_sense_desc_find(). I presume others will be using
it in the future (e.g. SAT returns ATA status via
a sense data descriptor with no corresponding fixed
format representation).
  - scsi_lib.c: scsi_device_resume
  - scsi_scan.c: scsi_rescan_device
  - scsi_scan.c: scsi_scan_single_target
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Douglas Gilbert
Adrian Bunk wrote:
Before I'm getting flamed to death:
Adrian,
I have a few comments below.
This patch contains possible cleanups. If parts of this patch conflict 
with pending changes these parts of my patch have to be dropped.

This patch contains the following possible cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
The names of the above are too general so they should go
as soon as practical.
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
I'm a bit surprised nothing else is using the above two.
  - scsi_scan.c: scsi_scan_single_target
- remove the following unneeded EXPORT_SYMBOL's:
  - constants.c: __scsi_print_sense
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_error.c: scsi_normalize_sense
I introduced scsi_normalize_sense() recently, Christoph H.
proposed it should be static but Luben Tuikov (aic7xxx
maintainer) said he wished to use it in the future.
Hence it was left global.
  - scsi_error.c: scsi_sense_desc_find
A pending patch on st from Kai M. will be using
scsi_sense_desc_find(). I presume others will be using
it in the future (e.g. SAT returns ATA status via
a sense data descriptor with no corresponding fixed
format representation).
  - scsi_lib.c: scsi_device_resume
  - scsi_scan.c: scsi_rescan_device
  - scsi_scan.c: scsi_scan_single_target
Doug Gilbert
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Salyzyn, Mark
Christoph Hellwig writes:
   - scsi_scan.c: scsi_rescan_device
aacraid was going to use that one, Mark, any chance to get a patch
anytime soon?
   - scsi_scan.c: scsi_scan_single_target
as mentioned above we'll need this one soon.

Yup, we use both of them in our branch of the driver. I submit a patch
to MarkH for the Hot-Add calls soon.

Sincerely -- Mark Salyzyn

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Luben Tuikov
On 03/01/05 03:14, Douglas Gilbert wrote:
  - scsi_error.c: scsi_normalize_sense

I introduced scsi_normalize_sense() recently, Christoph H.
proposed it should be static but Luben Tuikov (aic7xxx
maintainer) said he wished to use it in the future.
Hence it was left global.
Hi guys,
I think the idea of normalized sense is very good.
Basically the question is if LLDD would submit normalized
sense to SCSI Core or whether they would submit a pointer
to raw sense data as returned by the device and let SCSI
Core decipher it.
If the former, then it should be global, if the latter then
it should be static to SCSI Core.
Luben
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Christoph Hellwig
On Tue, Mar 01, 2005 at 09:40:48AM -0500, Luben Tuikov wrote:
 On 03/01/05 03:14, Douglas Gilbert wrote:
   - scsi_error.c: scsi_normalize_sense
 
 
 I introduced scsi_normalize_sense() recently, Christoph H.
 proposed it should be static but Luben Tuikov (aic7xxx
 maintainer) said he wished to use it in the future.
 Hence it was left global.
 
 Hi guys,
 
 I think the idea of normalized sense is very good.
 Basically the question is if LLDD would submit normalized
 sense to SCSI Core or whether they would submit a pointer
 to raw sense data as returned by the device and let SCSI
 Core decipher it.
 
 If the former, then it should be global, if the latter then
 it should be static to SCSI Core.

Doing it in the core means less duplication and avoiding updating
all drivers.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-03-01 Thread Luben Tuikov
On 03/01/05 17:17, Christoph Hellwig wrote:
Doing it in the core means less duplication and avoiding updating
all drivers.
I agree.
Luben
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Adrian Bunk
On Mon, Feb 28, 2005 at 10:25:09PM +, Christoph Hellwig wrote:
>...
> >   - constants.c: scsi_print_hostbyte
> >   - constants.c: scsi_print_driverbyte
> 
> these we'll probably keep for now.
>...

keep = #if 0 ?

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Christoph Hellwig
On Mon, Feb 28, 2005 at 10:31:59PM +0100, Adrian Bunk wrote:
> Before I'm getting flamed to death:
> This patch contains possible cleanups. If parts of this patch conflict 
> with pending changes these parts of my patch have to be dropped.
> 
> This patch contains the following possible cleanups:
> - make needlessly global code static
> - remove or #if 0 the following unused functions:
>   - scsi.h: print_driverbyte
>   - scsi.h: print_hostbyte

these two please kill.

>   - constants.c: scsi_print_hostbyte
>   - constants.c: scsi_print_driverbyte

these we'll probably keep for now.

>   - scsi_scan.c: scsi_scan_single_target

this one will grow a user soon, but maybe it'll be completely
rewritten before.

> - remove the following unneeded EXPORT_SYMBOL's:
>   - constants.c: __scsi_print_sense

this was put in for a drivea and makes sense as API.

>   - hosts.c: scsi_host_lookup

we should probably kill this export.

>   - scsi.c: scsi_device_cancel
>   - scsi_lib.c: scsi_device_resume

dito.

>   - scsi_error.c: scsi_normalize_sense
>   - scsi_error.c: scsi_sense_desc_find

st is expected to use these soon.

>   - scsi_scan.c: scsi_rescan_device

aacraid was going to use that one, Mark, any chance to get a patch
anytime soon?

>   - scsi_scan.c: scsi_scan_single_target

as mentioned above we'll need this one soon.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Adrian Bunk
Before I'm getting flamed to death:
This patch contains possible cleanups. If parts of this patch conflict 
with pending changes these parts of my patch have to be dropped.

This patch contains the following possible cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
  - scsi_scan.c: scsi_scan_single_target
- remove the following unneeded EXPORT_SYMBOL's:
  - constants.c: __scsi_print_sense
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_error.c: scsi_normalize_sense
  - scsi_error.c: scsi_sense_desc_find
  - scsi_lib.c: scsi_device_resume
  - scsi_scan.c: scsi_rescan_device
  - scsi_scan.c: scsi_scan_single_target

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 drivers/scsi/constants.c   |   56 -
 drivers/scsi/hosts.c   |3 -
 drivers/scsi/scsi.c|9 +++--
 drivers/scsi/scsi.h|8 -
 drivers/scsi/scsi_debug.c  |2 -
 drivers/scsi/scsi_error.c  |6 +--
 drivers/scsi/scsi_lib.c|5 +--
 drivers/scsi/scsi_priv.h   |4 --
 drivers/scsi/scsi_scan.c   |3 +
 drivers/scsi/scsi_sysfs.c  |4 +-
 include/scsi/scsi_dbg.h|5 ---
 include/scsi/scsi_device.h |1 
 include/scsi/scsi_eh.h |3 -
 include/scsi/scsi_host.h   |2 -
 14 files changed, 16 insertions(+), 95 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h.old   2005-02-28 
18:18:22.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h   2005-02-28 
18:19:02.0 +0100
@@ -80,14 +80,6 @@
 {
return scsi_print_req_sense(devclass, req);
 }
-static inline void print_driverbyte(int scsiresult)
-{
-   return scsi_print_driverbyte(scsiresult);
-}
-static inline void print_hostbyte(int scsiresult)
-{
-   return scsi_print_hostbyte(scsiresult);
-}
 static inline void print_status(unsigned char status)
 {
return scsi_print_status(status);
--- linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h.old   2005-02-28 
18:17:32.0 +0100
+++ linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h   2005-02-28 
18:18:57.0 +0100
@@ -8,11 +8,6 @@
 extern void __scsi_print_command(unsigned char *);
 extern void scsi_print_sense(const char *, struct scsi_cmnd *);
 extern void scsi_print_req_sense(const char *, struct scsi_request *);
-extern void __scsi_print_sense(const char *name,
-  const unsigned char *sense_buffer,
-  int sense_len);
-extern void scsi_print_driverbyte(int);
-extern void scsi_print_hostbyte(int);
 extern void scsi_print_status(unsigned char);
 extern int scsi_print_msg(const unsigned char *);
 extern const char *scsi_sense_key_string(unsigned char);
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c.old  2005-02-28 
18:17:46.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c  2005-02-28 
18:19:47.0 +0100
@@ -1156,7 +1156,7 @@
 }
 
 /* Print sense information */
-void
+static void
 __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
   int sense_len)
 {
@@ -1251,7 +1251,6 @@
printk("\n");
}
 }
-EXPORT_SYMBOL(__scsi_print_sense);
 
 void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
 {
@@ -1393,56 +1392,3 @@
 }
 EXPORT_SYMBOL(scsi_print_command);
 
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * hostbyte_table[]={
-"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", 
-"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
-"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"};
-#define NUM_HOSTBYTE_STRS (sizeof(hostbyte_table) / sizeof(const char *))
-
-void scsi_print_hostbyte(int scsiresult)
-{
-   int hb = host_byte(scsiresult);
-
-   printk("Hostbyte=0x%02x", hb);
-   if (hb < NUM_HOSTBYTE_STRS)
-   printk("(%s) ", hostbyte_table[hb]);
-   else
-   printk("is invalid "); 
-}
-#else
-void scsi_print_hostbyte(int scsiresult)
-{
-   printk("Hostbyte=0x%02x ", host_byte(scsiresult));
-}
-#endif
-
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * driverbyte_table[]={
-"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT",  "DRIVER_MEDIA", "DRIVER_ERROR", 
-"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
-#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *))
-
-static const char * driversuggest_table[]={"SUGGEST_OK",
-"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
-"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
-#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *))
-
-void scsi_print_driverbyte(int scsiresult)
-{
-   int dr = (driver_byte(scsiresult) & DRIVER_MASK);
-   int su = ((driver_byte(scsiresult) & SUGGEST_MASK) >> 4);
-
-   

[2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Adrian Bunk
Before I'm getting flamed to death:
This patch contains possible cleanups. If parts of this patch conflict 
with pending changes these parts of my patch have to be dropped.

This patch contains the following possible cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
  - scsi_scan.c: scsi_scan_single_target
- remove the following unneeded EXPORT_SYMBOL's:
  - constants.c: __scsi_print_sense
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_error.c: scsi_normalize_sense
  - scsi_error.c: scsi_sense_desc_find
  - scsi_lib.c: scsi_device_resume
  - scsi_scan.c: scsi_rescan_device
  - scsi_scan.c: scsi_scan_single_target

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/constants.c   |   56 -
 drivers/scsi/hosts.c   |3 -
 drivers/scsi/scsi.c|9 +++--
 drivers/scsi/scsi.h|8 -
 drivers/scsi/scsi_debug.c  |2 -
 drivers/scsi/scsi_error.c  |6 +--
 drivers/scsi/scsi_lib.c|5 +--
 drivers/scsi/scsi_priv.h   |4 --
 drivers/scsi/scsi_scan.c   |3 +
 drivers/scsi/scsi_sysfs.c  |4 +-
 include/scsi/scsi_dbg.h|5 ---
 include/scsi/scsi_device.h |1 
 include/scsi/scsi_eh.h |3 -
 include/scsi/scsi_host.h   |2 -
 14 files changed, 16 insertions(+), 95 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h.old   2005-02-28 
18:18:22.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h   2005-02-28 
18:19:02.0 +0100
@@ -80,14 +80,6 @@
 {
return scsi_print_req_sense(devclass, req);
 }
-static inline void print_driverbyte(int scsiresult)
-{
-   return scsi_print_driverbyte(scsiresult);
-}
-static inline void print_hostbyte(int scsiresult)
-{
-   return scsi_print_hostbyte(scsiresult);
-}
 static inline void print_status(unsigned char status)
 {
return scsi_print_status(status);
--- linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h.old   2005-02-28 
18:17:32.0 +0100
+++ linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h   2005-02-28 
18:18:57.0 +0100
@@ -8,11 +8,6 @@
 extern void __scsi_print_command(unsigned char *);
 extern void scsi_print_sense(const char *, struct scsi_cmnd *);
 extern void scsi_print_req_sense(const char *, struct scsi_request *);
-extern void __scsi_print_sense(const char *name,
-  const unsigned char *sense_buffer,
-  int sense_len);
-extern void scsi_print_driverbyte(int);
-extern void scsi_print_hostbyte(int);
 extern void scsi_print_status(unsigned char);
 extern int scsi_print_msg(const unsigned char *);
 extern const char *scsi_sense_key_string(unsigned char);
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c.old  2005-02-28 
18:17:46.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c  2005-02-28 
18:19:47.0 +0100
@@ -1156,7 +1156,7 @@
 }
 
 /* Print sense information */
-void
+static void
 __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
   int sense_len)
 {
@@ -1251,7 +1251,6 @@
printk(\n);
}
 }
-EXPORT_SYMBOL(__scsi_print_sense);
 
 void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
 {
@@ -1393,56 +1392,3 @@
 }
 EXPORT_SYMBOL(scsi_print_command);
 
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * hostbyte_table[]={
-DID_OK, DID_NO_CONNECT, DID_BUS_BUSY, DID_TIME_OUT, DID_BAD_TARGET, 
-DID_ABORT, DID_PARITY, DID_ERROR, DID_RESET, DID_BAD_INTR,
-DID_PASSTHROUGH, DID_SOFT_ERROR, DID_IMM_RETRY};
-#define NUM_HOSTBYTE_STRS (sizeof(hostbyte_table) / sizeof(const char *))
-
-void scsi_print_hostbyte(int scsiresult)
-{
-   int hb = host_byte(scsiresult);
-
-   printk(Hostbyte=0x%02x, hb);
-   if (hb  NUM_HOSTBYTE_STRS)
-   printk((%s) , hostbyte_table[hb]);
-   else
-   printk(is invalid ); 
-}
-#else
-void scsi_print_hostbyte(int scsiresult)
-{
-   printk(Hostbyte=0x%02x , host_byte(scsiresult));
-}
-#endif
-
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * driverbyte_table[]={
-DRIVER_OK, DRIVER_BUSY, DRIVER_SOFT,  DRIVER_MEDIA, DRIVER_ERROR, 
-DRIVER_INVALID, DRIVER_TIMEOUT, DRIVER_HARD, DRIVER_SENSE};
-#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *))
-
-static const char * driversuggest_table[]={SUGGEST_OK,
-SUGGEST_RETRY, SUGGEST_ABORT, SUGGEST_REMAP, SUGGEST_DIE,
-SUGGEST_5, SUGGEST_6, SUGGEST_7, SUGGEST_SENSE};
-#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *))
-
-void scsi_print_driverbyte(int scsiresult)
-{
-   int dr = (driver_byte(scsiresult)  DRIVER_MASK);
-   int su = ((driver_byte(scsiresult)  SUGGEST_MASK)  4);
-
-   printk(Driverbyte=0x%02x , driver_byte(scsiresult));
-   printk((%s,%s) ,
-   

Re: [2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Christoph Hellwig
On Mon, Feb 28, 2005 at 10:31:59PM +0100, Adrian Bunk wrote:
 Before I'm getting flamed to death:
 This patch contains possible cleanups. If parts of this patch conflict 
 with pending changes these parts of my patch have to be dropped.
 
 This patch contains the following possible cleanups:
 - make needlessly global code static
 - remove or #if 0 the following unused functions:
   - scsi.h: print_driverbyte
   - scsi.h: print_hostbyte

these two please kill.

   - constants.c: scsi_print_hostbyte
   - constants.c: scsi_print_driverbyte

these we'll probably keep for now.

   - scsi_scan.c: scsi_scan_single_target

this one will grow a user soon, but maybe it'll be completely
rewritten before.

 - remove the following unneeded EXPORT_SYMBOL's:
   - constants.c: __scsi_print_sense

this was put in for a drivea and makes sense as API.

   - hosts.c: scsi_host_lookup

we should probably kill this export.

   - scsi.c: scsi_device_cancel
   - scsi_lib.c: scsi_device_resume

dito.

   - scsi_error.c: scsi_normalize_sense
   - scsi_error.c: scsi_sense_desc_find

st is expected to use these soon.

   - scsi_scan.c: scsi_rescan_device

aacraid was going to use that one, Mark, any chance to get a patch
anytime soon?

   - scsi_scan.c: scsi_scan_single_target

as mentioned above we'll need this one soon.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [2.6 patch] SCSI: possible cleanups

2005-02-28 Thread Adrian Bunk
On Mon, Feb 28, 2005 at 10:25:09PM +, Christoph Hellwig wrote:
...
- constants.c: scsi_print_hostbyte
- constants.c: scsi_print_driverbyte
 
 these we'll probably keep for now.
...

keep = #if 0 ?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/