* [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h'
@ 2008-01-06 3:02 Richard Knutsson
2008-01-06 3:02 ` [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd' Richard Knutsson
` (34 more replies)
0 siblings, 35 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:02 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Hi all
drivers/scsi/scsi_typedefs.h is about ready to be removed, only the
'struct scsi_cmnd' typedef Scsi_Cmnd is left.
This set converts all the Scsi_Cmnd's, except in:
Changelogs
Documentation/scsi/scsi_mid_low_api.txt
So if all these gets merged, in one form or the other, we can:
un'include scsi_typedefs.h from drivers/scsi/scsi.h
fix the text in Documentation/scsi/scsi_mid_low_api.txt
(finally) remove the file in question
Left the "over 80 characters wide"-warnings alone, until requested otherwise.
Am not subscribed on linux-scsi@vger.kernel.org, so if replying, please Cc: me.
Yours,
Richard Knutsson
PS
If someone know of a tool to chain-mail patches and still be able to customize
the mail-addresses between them, please let me know.
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
@ 2008-01-06 3:02 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 2/33][SCSI] advansys: " Richard Knutsson
` (33 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:02 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 59716eb..54374e3 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1955,7 +1955,7 @@ static int tw_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd
if (test_bit(TW_IN_RESET, &tw_dev->flags))
return SCSI_MLQUEUE_HOST_BUSY;
- /* Save done function into Scsi_Cmnd struct */
+ /* Save done function into scsi_cmnd struct */
SCpnt->scsi_done = done;
/* Queue the command and get a request id */
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 2/33][SCSI] advansys: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
2008-01-06 3:02 ` [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd' Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 3/33][SCSI] aha152x: " Richard Knutsson
` (32 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 9dd3952..a9a8685 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -10920,7 +10920,7 @@ static int AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc, ADV_SCSI_REQ_Q *scsiq)
}
/*
- * Execute a single 'Scsi_Cmnd'.
+ * Execute a single 'scsi_cmnd'.
*/
static int asc_execute_scsi_cmnd(struct scsi_cmnd *scp)
{
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 3/33][SCSI] aha152x: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
2008-01-06 3:02 ` [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd' Richard Knutsson
2008-01-06 3:03 ` [PATCH 2/33][SCSI] advansys: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 4/33][SCSI] aha1542: " Richard Knutsson
` (31 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index ea8c699..e8eed86 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -460,16 +460,16 @@ enum aha152x_state {
*
*/
struct aha152x_hostdata {
- Scsi_Cmnd *issue_SC;
+ struct scsi_cmnd *issue_SC;
/* pending commands to issue */
- Scsi_Cmnd *current_SC;
+ struct scsi_cmnd *current_SC;
/* current command on the bus */
- Scsi_Cmnd *disconnected_SC;
+ struct scsi_cmnd *disconnected_SC;
/* commands that disconnected */
- Scsi_Cmnd *done_SC;
+ struct scsi_cmnd *done_SC;
/* command that was completed */
spinlock_t lock;
@@ -556,7 +556,7 @@ struct aha152x_hostdata {
*
*/
struct aha152x_scdata {
- Scsi_Cmnd *next; /* next sc in queue */
+ struct scsi_cmnd *next; /* next sc in queue */
struct completion *done;/* semaphore to block on */
unsigned char aha_orig_cmd_len;
unsigned char aha_orig_cmnd[MAX_COMMAND_SIZE];
@@ -682,7 +682,7 @@ static void done(struct Scsi_Host *shpnt, int error);
/* diagnostics */
static void disp_ports(struct Scsi_Host *shpnt);
-static void show_command(Scsi_Cmnd * ptr);
+static void show_command(struct scsi_cmnd *ptr);
static void show_queues(struct Scsi_Host *shpnt);
static void disp_enintr(struct Scsi_Host *shpnt);
@@ -691,9 +691,9 @@ static void disp_enintr(struct Scsi_Host *shpnt);
* queue services:
*
*/
-static inline void append_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC)
+static inline void append_SC(struct scsi_cmnd **SC, struct scsi_cmnd *new_SC)
{
- Scsi_Cmnd *end;
+ struct scsi_cmnd *end;
SCNEXT(new_SC) = NULL;
if (!*SC)
@@ -705,9 +705,9 @@ static inline void append_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC)
}
}
-static inline Scsi_Cmnd *remove_first_SC(Scsi_Cmnd ** SC)
+static inline struct scsi_cmnd *remove_first_SC(struct scsi_cmnd **SC)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
ptr = *SC;
if (ptr) {
@@ -717,9 +717,9 @@ static inline Scsi_Cmnd *remove_first_SC(Scsi_Cmnd ** SC)
return ptr;
}
-static inline Scsi_Cmnd *remove_lun_SC(Scsi_Cmnd ** SC, int target, int lun)
+static inline struct scsi_cmnd *remove_lun_SC(struct scsi_cmnd **SC, int target, int lun)
{
- Scsi_Cmnd *ptr, *prev;
+ struct scsi_cmnd *ptr, *prev;
for (ptr = *SC, prev = NULL;
ptr && ((ptr->device->id != target) || (ptr->device->lun != lun));
@@ -738,9 +738,9 @@ static inline Scsi_Cmnd *remove_lun_SC(Scsi_Cmnd ** SC, int target, int lun)
return ptr;
}
-static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp)
+static inline struct scsi_cmnd *remove_SC(struct scsi_cmnd **SC, struct scsi_cmnd *SCp)
{
- Scsi_Cmnd *ptr, *prev;
+ struct scsi_cmnd *ptr, *prev;
for (ptr = *SC, prev = NULL;
ptr && SCp!=ptr;
@@ -972,8 +972,8 @@ static int setup_expected_interrupts(struct Scsi_Host *shpnt)
/*
* Queue a command and setup interrupts for a free bus.
*/
-static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
- int phase, void (*done)(Scsi_Cmnd *))
+static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, struct completion *complete,
+ int phase, void (*done)(struct scsi_cmnd *))
{
struct Scsi_Host *shpnt = SCpnt->device->host;
unsigned long flags;
@@ -1062,7 +1062,7 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
* queue a command
*
*/
-static int aha152x_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+static int aha152x_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
#if 0
if(*SCpnt->cmnd == REQUEST_SENSE) {
@@ -1081,7 +1081,7 @@ static int aha152x_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
*
*
*/
-static void reset_done(Scsi_Cmnd *SCpnt)
+static void reset_done(struct scsi_cmnd *SCpnt)
{
#if 0
struct Scsi_Host *shpnt = SCpnt->host;
@@ -1098,10 +1098,10 @@ static void reset_done(Scsi_Cmnd *SCpnt)
* Abort a command
*
*/
-static int aha152x_abort(Scsi_Cmnd *SCpnt)
+static int aha152x_abort(struct scsi_cmnd *SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
#if defined(AHA152X_DEBUG)
@@ -1147,7 +1147,7 @@ static int aha152x_abort(Scsi_Cmnd *SCpnt)
* Reset a device
*
*/
-static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
+static int aha152x_device_reset(struct scsi_cmnd *SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
DECLARE_COMPLETION(done);
@@ -1212,13 +1212,13 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
return ret;
}
-static void free_hard_reset_SCs(struct Scsi_Host *shpnt, Scsi_Cmnd **SCs)
+static void free_hard_reset_SCs(struct Scsi_Host *shpnt, struct scsi_cmnd **SCs)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
ptr=*SCs;
while(ptr) {
- Scsi_Cmnd *next;
+ struct scsi_cmnd *next;
if(SCDATA(ptr)) {
next = SCNEXT(ptr);
@@ -1281,7 +1281,7 @@ static int aha152x_bus_reset_host(struct Scsi_Host *shpnt)
* Reset the bus
*
*/
-static int aha152x_bus_reset(Scsi_Cmnd *SCpnt)
+static int aha152x_bus_reset(struct scsi_cmnd *SCpnt)
{
return aha152x_bus_reset_host(SCpnt->device->host);
}
@@ -1343,7 +1343,7 @@ int aha152x_host_reset_host(struct Scsi_Host *shpnt)
* Reset the host (bus and controller)
*
*/
-static int aha152x_host_reset(Scsi_Cmnd *SCpnt)
+static int aha152x_host_reset(struct scsi_cmnd *SCpnt)
{
return aha152x_host_reset_host(SCpnt->device->host);
}
@@ -1581,7 +1581,7 @@ static void busfree_run(struct Scsi_Host *shpnt)
if(!(DONE_SC->SCp.phase & not_issued)) {
struct aha152x_scdata *sc;
- Scsi_Cmnd *ptr = DONE_SC;
+ struct scsi_cmnd *ptr = DONE_SC;
DONE_SC=NULL;
#if 0
DPRINTK(debug_eh, ERR_LEAD "requesting sense\n", CMDINFO(ptr));
@@ -1620,7 +1620,7 @@ static void busfree_run(struct Scsi_Host *shpnt)
int id=DONE_SC->device->id & 0xf;
int lun=DONE_SC->device->lun & 0x7;
#endif
- Scsi_Cmnd *ptr = DONE_SC;
+ struct scsi_cmnd *ptr = DONE_SC;
DONE_SC=NULL;
/* turn led off, when no commands are in the driver */
@@ -2490,13 +2490,13 @@ static void parerr_run(struct Scsi_Host *shpnt)
*/
static void rsti_run(struct Scsi_Host *shpnt)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
printk(KERN_NOTICE "aha152x%d: scsi reset in\n", HOSTNO);
ptr=DISCONNECTED_SC;
while(ptr) {
- Scsi_Cmnd *next = SCNEXT(ptr);
+ struct scsi_cmnd *next = SCNEXT(ptr);
if (!ptr->device->soft_reset) {
remove_SC(&DISCONNECTED_SC, ptr);
@@ -2930,7 +2930,7 @@ static void disp_enintr(struct Scsi_Host *shpnt)
/*
* Show the command data of a command
*/
-static void show_command(Scsi_Cmnd *ptr)
+static void show_command(struct scsi_cmnd *ptr)
{
scmd_printk(KERN_DEBUG, ptr, "%p: cmnd=(", ptr);
@@ -2969,7 +2969,7 @@ static void show_command(Scsi_Cmnd *ptr)
*/
static void show_queues(struct Scsi_Host *shpnt)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
DO_LOCK(flags);
@@ -2995,7 +2995,7 @@ static void show_queues(struct Scsi_Host *shpnt)
#undef SPRINTF
#define SPRINTF(args...) pos += sprintf(pos, ## args)
-static int get_command(char *pos, Scsi_Cmnd * ptr)
+static int get_command(char *pos, struct scsi_cmnd *ptr)
{
char *start = pos;
int i;
@@ -3345,7 +3345,7 @@ static int aha152x_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start
{
int i;
char *pos = buffer;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
int thislength;
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 4/33][SCSI] aha1542: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (2 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 3/33][SCSI] aha152x: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 5/33][SCSI] aha1740: " Richard Knutsson
` (30 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index bbcc2c5..5e1a17e 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -60,7 +60,7 @@ static void BAD_DMA(void *address, unsigned int length)
panic("Buffer at physical address > 16Mb used for aha1542");
}
-static void BAD_SG_DMA(Scsi_Cmnd * SCpnt,
+static void BAD_SG_DMA(struct scsi_cmnd *SCpnt,
struct scatterlist *sgp,
int nseg,
int badseg)
@@ -155,7 +155,7 @@ struct aha1542_hostdata {
int bios_translation; /* Mapping bios uses - for compatibility */
int aha1542_last_mbi_used;
int aha1542_last_mbo_used;
- Scsi_Cmnd *SCint[AHA1542_MAILBOXES];
+ struct scsi_cmnd *SCint[AHA1542_MAILBOXES];
struct mailbox mb[2 * AHA1542_MAILBOXES];
struct ccb ccb[AHA1542_MAILBOXES];
};
@@ -431,11 +431,11 @@ static irqreturn_t do_aha1542_intr_handle(int irq, void *dev_id)
/* A "high" level interrupt handler */
static void aha1542_intr_handle(struct Scsi_Host *shost, void *dev_id)
{
- void (*my_done) (Scsi_Cmnd *) = NULL;
+ void (*my_done) (struct scsi_cmnd *) = NULL;
int errstatus, mbi, mbo, mbistatus;
int number_serviced;
unsigned long flags;
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
int flag;
int needs_restart;
struct mailbox *mb;
@@ -589,7 +589,7 @@ static void aha1542_intr_handle(struct Scsi_Host *shost, void *dev_id)
};
}
-static int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int aha1542_queuecommand(struct scsi_cmnd *SCpnt, void (*done) (struct scsi_cmnd *))
{
unchar ahacmd = CMD_START_SCSI;
unchar direction;
@@ -1339,7 +1339,7 @@ static int aha1542_restart(struct Scsi_Host *shost)
* This is a device reset. This is handled by sending a special command
* to the device.
*/
-static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
+static int aha1542_dev_reset(struct scsi_cmnd *SCpnt)
{
unsigned long flags;
struct mailbox *mb;
@@ -1417,7 +1417,7 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
for (i = 0; i < AHA1542_MAILBOXES; i++) {
if (HOSTDATA(SCpnt->host)->SCint[i] &&
HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) {
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
kfree(SCtmp->host_scribble);
SCtmp->host_scribble = NULL;
@@ -1431,7 +1431,7 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
#endif /* ERIC_neverdef */
}
-static int aha1542_bus_reset(Scsi_Cmnd * SCpnt)
+static int aha1542_bus_reset(struct scsi_cmnd *SCpnt)
{
int i;
@@ -1467,7 +1467,7 @@ static int aha1542_bus_reset(Scsi_Cmnd * SCpnt)
for (i = 0; i < AHA1542_MAILBOXES; i++) {
if (HOSTDATA(SCpnt->device->host)->SCint[i] != NULL) {
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
SCtmp = HOSTDATA(SCpnt->device->host)->SCint[i];
@@ -1495,7 +1495,7 @@ fail:
return FAILED;
}
-static int aha1542_host_reset(Scsi_Cmnd * SCpnt)
+static int aha1542_host_reset(struct scsi_cmnd *SCpnt)
{
int i;
@@ -1536,7 +1536,7 @@ static int aha1542_host_reset(Scsi_Cmnd * SCpnt)
for (i = 0; i < AHA1542_MAILBOXES; i++) {
if (HOSTDATA(SCpnt->device->host)->SCint[i] != NULL) {
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
SCtmp = HOSTDATA(SCpnt->device->host)->SCint[i];
if (SCtmp->device->soft_reset) {
@@ -1568,7 +1568,7 @@ fail:
* These are the old error handling routines. They are only temporarily
* here while we play with the new error handling code.
*/
-static int aha1542_old_abort(Scsi_Cmnd * SCpnt)
+static int aha1542_old_abort(struct scsi_cmnd *SCpnt)
{
#if 0
unchar ahacmd = CMD_START_SCSI;
@@ -1646,7 +1646,7 @@ static int aha1542_old_abort(Scsi_Cmnd * SCpnt)
For a first go, we assume that the 1542 notifies us with all of the
pending commands (it does implement soft reset, after all). */
-static int aha1542_old_reset(Scsi_Cmnd * SCpnt, unsigned int reset_flags)
+static int aha1542_old_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags)
{
unchar ahacmd = CMD_START_SCSI;
int i;
@@ -1689,7 +1689,7 @@ static int aha1542_old_reset(Scsi_Cmnd * SCpnt, unsigned int reset_flags)
for (i = 0; i < AHA1542_MAILBOXES; i++)
if (HOSTDATA(SCpnt->host)->SCint[i] != NULL) {
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCtmp->result = DID_RESET << 16;
kfree(SCtmp->host_scribble);
@@ -1733,7 +1733,7 @@ fail:
for (i = 0; i < AHA1542_MAILBOXES; i++)
if (HOSTDATA(SCpnt->host)->SCint[i] &&
HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) {
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
SCtmp->result = DID_RESET << 16;
kfree(SCtmp->host_scribble);
diff --git a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
index 1db5385..951590a 100644
--- a/drivers/scsi/aha1542.h
+++ b/drivers/scsi/aha1542.h
@@ -132,13 +132,13 @@ struct ccb { /* Command Control Block 5.3 */
};
static int aha1542_detect(struct scsi_host_template *);
-static int aha1542_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);
-static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);
-static int aha1542_host_reset(Scsi_Cmnd * SCpnt);
+static int aha1542_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int aha1542_bus_reset(struct scsi_cmnd *SCpnt);
+static int aha1542_dev_reset(struct scsi_cmnd *SCpnt);
+static int aha1542_host_reset(struct scsi_cmnd *SCpnt);
#if 0
-static int aha1542_old_abort(Scsi_Cmnd * SCpnt);
-static int aha1542_old_reset(Scsi_Cmnd *, unsigned int);
+static int aha1542_old_abort(struct scsi_cmnd *SCpnt);
+static int aha1542_old_reset(struct scsi_cmnd *, unsigned int);
#endif
static int aha1542_biosparam(struct scsi_device *, struct block_device *,
sector_t, int *);
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 5/33][SCSI] aha1740: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (3 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 4/33][SCSI] aha1542: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 6/33][SCSI] atari_NCR5380: " Richard Knutsson
` (29 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index f6722fd..4fa801f 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -226,11 +226,11 @@ static int aha1740_test_port(unsigned int base)
static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
{
struct Scsi_Host *host = (struct Scsi_Host *) dev_id;
- void (*my_done)(Scsi_Cmnd *);
+ void (*my_done)(struct scsi_cmnd *);
int errstatus, adapstat;
int number_serviced;
struct ecb *ecbptr;
- Scsi_Cmnd *SCtmp;
+ struct scsi_cmnd *SCtmp;
unsigned int base;
unsigned long flags;
int handled = 0;
@@ -330,7 +330,7 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
return IRQ_RETVAL(handled);
}
-static int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
+static int aha1740_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
unchar direction;
unchar *cmd = (unchar *) SCpnt->cmnd;
@@ -537,7 +537,7 @@ static int aha1740_biosparam(struct scsi_device *sdev,
return 0;
}
-static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy)
+static int aha1740_eh_abort_handler (struct scsi_cmnd *dummy)
{
/*
* From Alan Cox :
diff --git a/drivers/scsi/aha1740.h b/drivers/scsi/aha1740.h
index af23fd6..1a3fdf7 100644
--- a/drivers/scsi/aha1740.h
+++ b/drivers/scsi/aha1740.h
@@ -134,8 +134,8 @@ struct ecb { /* Enhanced Control Block 6.1 */
/* Hardware defined portion ends here, rest is driver defined */
u8 sense[MAX_SENSE]; /* Sense area */
u8 status[MAX_STATUS]; /* Status area */
- Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */
- void (*done) (Scsi_Cmnd *); /* Completion Function */
+ struct scsi_cmnd *SCpnt; /* Link to the SCSI Command Block */
+ void (*done) (struct scsi_cmnd *); /* Completion Function */
};
#define AHA1740CMD_NOP 0x00 /* No OP */
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6/33][SCSI] atari_NCR5380: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (4 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 5/33][SCSI] aha1740: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 7/33][SCSI] atari_scsi: " Richard Knutsson
` (28 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index a9680b5..8bd1529 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -272,9 +272,9 @@ static struct scsi_host_template *the_template = NULL;
(struct NCR5380_hostdata *)(in)->hostdata
#define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata)
-#define NEXT(cmd) ((Scsi_Cmnd *)(cmd)->host_scribble)
+#define NEXT(cmd) ((struct scsi_cmnd *)(cmd)->host_scribble)
#define SET_NEXT(cmd,next) ((cmd)->host_scribble = (void *)(next))
-#define NEXTADDR(cmd) ((Scsi_Cmnd **)&(cmd)->host_scribble)
+#define NEXTADDR(cmd) ((struct scsi_cmnd **)&(cmd)->host_scribble)
#define HOSTNO instance->host_no
#define H_NO(cmd) (cmd)->device->host->host_no
@@ -359,7 +359,7 @@ static void __init init_tags(void)
* conditions.
*/
-static int is_lun_busy(Scsi_Cmnd *cmd, int should_be_tagged)
+static int is_lun_busy(struct scsi_cmnd *cmd, int should_be_tagged)
{
SETUP_HOSTDATA(cmd->device->host);
@@ -383,7 +383,7 @@ static int is_lun_busy(Scsi_Cmnd *cmd, int should_be_tagged)
* untagged.
*/
-static void cmd_get_tag(Scsi_Cmnd *cmd, int should_be_tagged)
+static void cmd_get_tag(struct scsi_cmnd *cmd, int should_be_tagged)
{
SETUP_HOSTDATA(cmd->device->host);
@@ -414,7 +414,7 @@ static void cmd_get_tag(Scsi_Cmnd *cmd, int should_be_tagged)
* unlock the LUN.
*/
-static void cmd_free_tag(Scsi_Cmnd *cmd)
+static void cmd_free_tag(struct scsi_cmnd *cmd)
{
SETUP_HOSTDATA(cmd->device->host);
@@ -456,18 +456,18 @@ static void free_all_tags(void)
/*
- * Function: void merge_contiguous_buffers( Scsi_Cmnd *cmd )
+ * Function: void merge_contiguous_buffers( struct scsi_cmnd *cmd )
*
* Purpose: Try to merge several scatter-gather requests into one DMA
* transfer. This is possible if the scatter buffers lie on
* physical contiguous addresses.
*
- * Parameters: Scsi_Cmnd *cmd
+ * Parameters: struct scsi_cmnd *cmd
* The command to work on. The first scatter buffer's data are
* assumed to be already transfered into ptr/this_residual.
*/
-static void merge_contiguous_buffers(Scsi_Cmnd *cmd)
+static void merge_contiguous_buffers(struct scsi_cmnd *cmd)
{
unsigned long endaddr;
#if (NDEBUG & NDEBUG_MERGING)
@@ -496,15 +496,15 @@ static void merge_contiguous_buffers(Scsi_Cmnd *cmd)
}
/*
- * Function : void initialize_SCp(Scsi_Cmnd *cmd)
+ * Function : void initialize_SCp(struct scsi_cmnd *cmd)
*
* Purpose : initialize the saved data pointers for cmd to point to the
* start of the buffer.
*
- * Inputs : cmd - Scsi_Cmnd structure to have pointers reset.
+ * Inputs : cmd - scsi_cmnd structure to have pointers reset.
*/
-static inline void initialize_SCp(Scsi_Cmnd *cmd)
+static inline void initialize_SCp(struct scsi_cmnd *cmd)
{
/*
* Initialize the Scsi Pointer field so that all of the commands in the
@@ -759,14 +759,14 @@ static void NCR5380_print_status(struct Scsi_Host *instance)
if (pos + strlen(fmt) + 20 /* slop */ < buffer + length) \
pos += sprintf(pos, fmt , ## args); \
} while(0)
-static char *lprint_Scsi_Cmnd(Scsi_Cmnd *cmd, char *pos, char *buffer, int length);
+static char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer, int length);
static int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer,
char **start, off_t offset, int length, int inout)
{
char *pos = buffer;
struct NCR5380_hostdata *hostdata;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
off_t begin = 0;
#define check_offset() \
@@ -790,18 +790,18 @@ static int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer,
if (!hostdata->connected)
SPRINTF("scsi%d: no currently connected command\n", HOSTNO);
else
- pos = lprint_Scsi_Cmnd((Scsi_Cmnd *) hostdata->connected,
+ pos = lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected,
pos, buffer, length);
SPRINTF("scsi%d: issue_queue\n", HOSTNO);
check_offset();
- for (ptr = (Scsi_Cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) {
+ for (ptr = (struct scsi_cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) {
pos = lprint_Scsi_Cmnd(ptr, pos, buffer, length);
check_offset();
}
SPRINTF("scsi%d: disconnected_queue\n", HOSTNO);
check_offset();
- for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr;
+ for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr;
ptr = NEXT(ptr)) {
pos = lprint_Scsi_Cmnd(ptr, pos, buffer, length);
check_offset();
@@ -816,7 +816,7 @@ static int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer,
return length;
}
-static char *lprint_Scsi_Cmnd(Scsi_Cmnd *cmd, char *pos, char *buffer, int length)
+static char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer, int length)
{
int i, s;
unsigned char *command;
@@ -892,8 +892,8 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
}
/*
- * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
- * void (*done)(Scsi_Cmnd *))
+ * Function : int NCR5380_queue_command (struct scsi_cmnd *cmd,
+ * void (*done)(struct scsi_cmnd *))
*
* Purpose : enqueues a SCSI command
*
@@ -909,10 +909,10 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
*
*/
-static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+static int NCR5380_queue_command(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
{
SETUP_HOSTDATA(cmd->device->host);
- Scsi_Cmnd *tmp;
+ struct scsi_cmnd *tmp;
int oldto;
unsigned long flags;
@@ -996,7 +996,7 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
SET_NEXT(cmd, hostdata->issue_queue);
hostdata->issue_queue = cmd;
} else {
- for (tmp = (Scsi_Cmnd *)hostdata->issue_queue;
+ for (tmp = (struct scsi_cmnd *)hostdata->issue_queue;
NEXT(tmp); tmp = NEXT(tmp))
;
LIST(cmd, tmp);
@@ -1035,7 +1035,7 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
static void NCR5380_main(struct work_struct *work)
{
- Scsi_Cmnd *tmp, *prev;
+ struct scsi_cmnd *tmp, *prev;
struct Scsi_Host *instance = first_instance;
struct NCR5380_hostdata *hostdata = HOSTDATA(instance);
int done;
@@ -1078,7 +1078,7 @@ static void NCR5380_main(struct work_struct *work)
* for a target that's not busy.
*/
#if (NDEBUG & NDEBUG_LISTS)
- for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL;
+ for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL;
tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp))
;
/*printk("%p ", tmp);*/
@@ -1086,7 +1086,7 @@ static void NCR5380_main(struct work_struct *work)
printk(" LOOP\n");
/* else printk("\n"); */
#endif
- for (tmp = (Scsi_Cmnd *) hostdata->issue_queue,
+ for (tmp = (struct scsi_cmnd *) hostdata->issue_queue,
prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp)) {
#if (NDEBUG & NDEBUG_LISTS)
@@ -1349,7 +1349,7 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id)
}
#ifdef NCR5380_STATS
-static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd)
+static void collect_stats(struct NCR5380_hostdata *hostdata, struct scsi_cmnd *cmd)
{
# ifdef NCR5380_STAT_LIMIT
if (cmd->request_bufflen > NCR5380_STAT_LIMIT)
@@ -1374,7 +1374,7 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd)
#endif
/*
- * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd,
+ * Function : int NCR5380_select (struct Scsi_Host *instance, struct scsi_cmnd *cmd,
* int tag);
*
* Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command,
@@ -1404,7 +1404,7 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd)
* cmd->result host byte set to DID_BAD_TARGET.
*/
-static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd, int tag)
+static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, int tag)
{
SETUP_HOSTDATA(instance);
unsigned char tmp[3], phase;
@@ -2006,7 +2006,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
#endif
unsigned char *data;
unsigned char phase, tmp, extended_msg[10], old_phase = 0xff;
- Scsi_Cmnd *cmd = (Scsi_Cmnd *) hostdata->connected;
+ struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected;
while (1) {
tmp = NCR5380_read(STATUS_REG);
@@ -2247,7 +2247,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
local_irq_save(flags);
LIST(cmd,hostdata->issue_queue);
SET_NEXT(cmd, hostdata->issue_queue);
- hostdata->issue_queue = (Scsi_Cmnd *) cmd;
+ hostdata->issue_queue = (struct scsi_cmnd *) cmd;
local_irq_restore(flags);
QU_PRINTK("scsi%d: REQUEST SENSE added to head of "
"issue queue\n", H_NO(cmd));
@@ -2479,7 +2479,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
* Function : void NCR5380_reselect (struct Scsi_Host *instance)
*
* Purpose : does reselection, initializing the instance->connected
- * field to point to the Scsi_Cmnd for which the I_T_L or I_T_L_Q
+ * field to point to the scsi_cmnd for which the I_T_L or I_T_L_Q
* nexus has been reestablished,
*
* Inputs : instance - this instance of the NCR5380.
@@ -2498,7 +2498,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
#endif
unsigned char msg[3];
unsigned char *data;
- Scsi_Cmnd *tmp = NULL, *prev;
+ struct scsi_cmnd *tmp = NULL, *prev;
/* unsigned long flags; */
/*
@@ -2572,7 +2572,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
* just reestablished, and remove it from the disconnected queue.
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL;
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL;
tmp; prev = tmp, tmp = NEXT(tmp)) {
if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun)
#ifdef SUPPORT_TAGS
@@ -2623,11 +2623,11 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
/*
- * Function : int NCR5380_abort (Scsi_Cmnd *cmd)
+ * Function : int NCR5380_abort (struct scsi_cmnd *cmd)
*
* Purpose : abort a command
*
- * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the
+ * Inputs : cmd - the scsi_cmnd to abort, code - code to set the
* host byte of the result field to, if zero DID_ABORTED is
* used.
*
@@ -2640,11 +2640,11 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
*/
static
-int NCR5380_abort(Scsi_Cmnd *cmd)
+int NCR5380_abort(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance = cmd->device->host;
SETUP_HOSTDATA(instance);
- Scsi_Cmnd *tmp, **prev;
+ struct scsi_cmnd *tmp, **prev;
unsigned long flags;
printk(KERN_NOTICE "scsi%d: aborting command\n", HOSTNO);
@@ -2714,8 +2714,8 @@ int NCR5380_abort(Scsi_Cmnd *cmd)
* Case 2 : If the command hasn't been issued yet, we simply remove it
* from the issue queue.
*/
- for (prev = (Scsi_Cmnd **)&(hostdata->issue_queue),
- tmp = (Scsi_Cmnd *)hostdata->issue_queue;
+ for (prev = (struct scsi_cmnd **)&(hostdata->issue_queue),
+ tmp = (struct scsi_cmnd *)hostdata->issue_queue;
tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) {
if (cmd == tmp) {
REMOVE(5, *prev, tmp, NEXT(tmp));
@@ -2775,7 +2775,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd)
* it from the disconnected queue.
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp;
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp;
tmp = NEXT(tmp)) {
if (cmd == tmp) {
local_irq_restore(flags);
@@ -2789,8 +2789,8 @@ int NCR5380_abort(Scsi_Cmnd *cmd)
do_abort(instance);
local_irq_save(flags);
- for (prev = (Scsi_Cmnd **)&(hostdata->disconnected_queue),
- tmp = (Scsi_Cmnd *)hostdata->disconnected_queue;
+ for (prev = (struct scsi_cmnd **)&(hostdata->disconnected_queue),
+ tmp = (struct scsi_cmnd *)hostdata->disconnected_queue;
tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) {
if (cmd == tmp) {
REMOVE(5, *prev, tmp, NEXT(tmp));
@@ -2840,7 +2840,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd)
/*
- * Function : int NCR5380_reset (Scsi_Cmnd *cmd)
+ * Function : int NCR5380_reset (struct scsi_cmnd *cmd)
*
* Purpose : reset the SCSI bus.
*
@@ -2848,13 +2848,13 @@ int NCR5380_abort(Scsi_Cmnd *cmd)
*
*/
-static int NCR5380_bus_reset(Scsi_Cmnd *cmd)
+static int NCR5380_bus_reset(struct scsi_cmnd *cmd)
{
SETUP_HOSTDATA(cmd->device->host);
int i;
unsigned long flags;
#if 1
- Scsi_Cmnd *connected, *disconnected_queue;
+ struct scsi_cmnd *connected, *disconnected_queue;
#endif
if (!IS_A_TT() && !falcon_got_lock)
@@ -2889,9 +2889,9 @@ static int NCR5380_bus_reset(Scsi_Cmnd *cmd)
* remembered in local variables first.
*/
local_irq_save(flags);
- connected = (Scsi_Cmnd *)hostdata->connected;
+ connected = (struct scsi_cmnd *)hostdata->connected;
hostdata->connected = NULL;
- disconnected_queue = (Scsi_Cmnd *)hostdata->disconnected_queue;
+ disconnected_queue = (struct scsi_cmnd *)hostdata->disconnected_queue;
hostdata->disconnected_queue = NULL;
#ifdef SUPPORT_TAGS
free_all_tags();
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 7/33][SCSI] atari_scsi: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (5 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 6/33][SCSI] atari_NCR5380: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 8/33][SCSI] blz1230: " Richard Knutsson
` (27 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-warnings.
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index f5732d8..a5d6ab4 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -189,9 +189,9 @@ static inline void DISABLE_IRQ(void)
static int scsi_dma_is_ignored_buserr(unsigned char dma_stat);
static void atari_scsi_fetch_restbytes(void);
static long atari_scsi_dma_residual(struct Scsi_Host *instance);
-static int falcon_classify_cmd(Scsi_Cmnd *cmd);
+static int falcon_classify_cmd(struct scsi_cmnd *cmd);
static unsigned long atari_dma_xfer_len(unsigned long wanted_len,
- Scsi_Cmnd *cmd, int write_flag);
+ struct scsi_cmnd *cmd, int write_flag);
#endif
static irqreturn_t scsi_tt_intr(int irq, void *dummy);
static irqreturn_t scsi_falcon_intr(int irq, void *dummy);
@@ -582,7 +582,7 @@ static void falcon_get_lock(void)
*/
#if 0
-int atari_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+int atari_queue_command(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
{
/* falcon_get_lock();
* ++guenther: moved to NCR5380_queue_command() to prevent
@@ -812,7 +812,7 @@ void __init atari_scsi_setup(char *str, int *ints)
#endif
}
-int atari_scsi_bus_reset(Scsi_Cmnd *cmd)
+int atari_scsi_bus_reset(struct scsi_cmnd *cmd)
{
int rv;
struct NCR5380_hostdata *hostdata =
@@ -972,7 +972,7 @@ static long atari_scsi_dma_residual(struct Scsi_Host *instance)
#define CMD_SURELY_BYTE_MODE 1
#define CMD_MODE_UNKNOWN 2
-static int falcon_classify_cmd(Scsi_Cmnd *cmd)
+static int falcon_classify_cmd(struct scsi_cmnd *cmd)
{
unsigned char opcode = cmd->cmnd[0];
@@ -1004,7 +1004,7 @@ static int falcon_classify_cmd(Scsi_Cmnd *cmd)
*/
static unsigned long atari_dma_xfer_len(unsigned long wanted_len,
- Scsi_Cmnd *cmd, int write_flag)
+ struct scsi_cmnd *cmd, int write_flag)
{
unsigned long possible_len, limit;
#ifndef CONFIG_TT_DMA_EMUL
diff --git a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h
index efadb8d..48c1e46 100644
--- a/drivers/scsi/atari_scsi.h
+++ b/drivers/scsi/atari_scsi.h
@@ -20,7 +20,7 @@
#ifndef ASM
int atari_scsi_detect (struct scsi_host_template *);
const char *atari_scsi_info (struct Scsi_Host *);
-int atari_scsi_reset (Scsi_Cmnd *, unsigned int);
+int atari_scsi_reset(struct scsi_cmnd *, unsigned int);
int atari_scsi_release (struct Scsi_Host *);
/* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 8/33][SCSI] blz1230: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (6 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 7/33][SCSI] atari_scsi: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 9/33][SCSI] blz2060: " Richard Knutsson
` (26 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/blz1230.c b/drivers/scsi/blz1230.c
index 23f7c24..323038c 100644
--- a/drivers/scsi/blz1230.c
+++ b/drivers/scsi/blz1230.c
@@ -77,7 +77,7 @@ struct blz1230II_dma_registers {
#define BLZ1230_DMA_WRITE 0x80000000
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length);
@@ -211,7 +211,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
/* I don't think there's any limit on the Blizzard DMA. So we use what
* the ESP chip can handle (24 bit).
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 9/33][SCSI] blz2060: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (7 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 8/33][SCSI] blz1230: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 10/33][SCSI] cyberstorm: " Richard Knutsson
` (25 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/blz2060.c b/drivers/scsi/blz2060.c
index b6203ec..c7b98b8 100644
--- a/drivers/scsi/blz2060.c
+++ b/drivers/scsi/blz2060.c
@@ -71,7 +71,7 @@ struct blz2060_dma_registers {
#define BLZ2060_DMA_LED 0x02 /* HD led control 1 = off */
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length);
@@ -176,7 +176,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
/* I don't think there's any limit on the Blizzard DMA. So we use what
* the ESP chip can handle (24 bit).
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 10/33][SCSI] cyberstorm: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (8 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 9/33][SCSI] blz2060: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 11/33][SCSI] cyberstormII: " Richard Knutsson
` (24 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/cyberstorm.c b/drivers/scsi/cyberstorm.c
index c6b98a4..3f8d1b0 100644
--- a/drivers/scsi/cyberstorm.c
+++ b/drivers/scsi/cyberstorm.c
@@ -79,7 +79,7 @@ struct cyber_dma_registers {
#define CYBER_SLOW_CABLE 0x08 /* If *not* set, assume SLOW_CABLE */
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length);
@@ -206,7 +206,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
/* I don't think there's any limit on the CyberDMA. So we use what
* the ESP chip can handle (24 bit).
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 11/33][SCSI] cyberstormII: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (9 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 10/33][SCSI] cyberstorm: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 12/33][SCSI] dtc: " Richard Knutsson
` (23 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/cyberstormII.c b/drivers/scsi/cyberstormII.c
index e336e85..e1d9c56 100644
--- a/drivers/scsi/cyberstormII.c
+++ b/drivers/scsi/cyberstormII.c
@@ -62,7 +62,7 @@ struct cyberII_dma_registers {
#define CYBERII_DMA_LED 0x02 /* HD led control 1 = on */
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length);
@@ -183,7 +183,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
/* I don't think there's any limit on the CyberDMA. So we use what
* the ESP chip can handle (24 bit).
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 12/33][SCSI] dtc: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (10 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 11/33][SCSI] cyberstormII: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 13/33][SCSI] fastlane: " Richard Knutsson
` (22 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h
index 0b205f8..524b711 100644
--- a/drivers/scsi/dtc.h
+++ b/drivers/scsi/dtc.h
@@ -32,12 +32,12 @@
#define DTCDEBUG_INIT 0x1
#define DTCDEBUG_TRANSFER 0x2
-static int dtc_abort(Scsi_Cmnd *);
+static int dtc_abort(struct scsi_cmnd *);
static int dtc_biosparam(struct scsi_device *, struct block_device *,
sector_t, int*);
static int dtc_detect(struct scsi_host_template *);
-static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int dtc_bus_reset(Scsi_Cmnd *);
+static int dtc_queue_command(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int dtc_bus_reset(struct scsi_cmnd *);
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 13/33][SCSI] fastlane: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (11 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 12/33][SCSI] dtc: " Richard Knutsson
@ 2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 14/33][SCSI] fd_mcs: " Richard Knutsson
` (21 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:03 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/fastlane.c b/drivers/scsi/fastlane.c
index 4266a21..c16df66 100644
--- a/drivers/scsi/fastlane.c
+++ b/drivers/scsi/fastlane.c
@@ -84,7 +84,7 @@ struct fastlane_dma_registers {
#define FASTLANE_DMA_ESI 0x01 /* Enable SCSI IRQ */
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 vaddr, int length);
@@ -254,7 +254,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
unsigned long sz = sp->SCp.this_residual;
if(sz > 0xfffc)
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 14/33][SCSI] fd_mcs: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (12 preceding siblings ...)
2008-01-06 3:03 ` [PATCH 13/33][SCSI] fastlane: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 15/33][SCSI] gdth: " Richard Knutsson
` (20 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c
index 8335b60..5feb9f2 100644
--- a/drivers/scsi/fd_mcs.c
+++ b/drivers/scsi/fd_mcs.c
@@ -184,7 +184,7 @@ struct fd_hostdata {
int _bios_major;
int _bios_minor;
volatile int _in_command;
- Scsi_Cmnd *_current_SC;
+ struct scsi_cmnd *_current_SC;
enum chip_type _chip;
int _adapter_mask;
int _fifo_count; /* Number of 512 byte blocks before INTR */
@@ -1089,7 +1089,7 @@ static int fd_mcs_release(struct Scsi_Host *shpnt)
return 0;
}
-static int fd_mcs_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int fd_mcs_queue(struct scsi_cmnd *SCpnt, void (*done) (struct scsi_cmnd *))
{
struct Scsi_Host *shpnt = SCpnt->device->host;
@@ -1138,7 +1138,7 @@ static int fd_mcs_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
}
#if DEBUG_ABORT || DEBUG_RESET
-static void fd_mcs_print_info(Scsi_Cmnd * SCpnt)
+static void fd_mcs_print_info(struct scsi_cmnd *SCpnt)
{
unsigned int imr;
unsigned int irr;
@@ -1207,7 +1207,7 @@ static void fd_mcs_print_info(Scsi_Cmnd * SCpnt)
}
#endif
-static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
+static int fd_mcs_abort(struct scsi_cmnd *SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
@@ -1243,7 +1243,8 @@ static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
return SUCCESS;
}
-static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
+static int fd_mcs_bus_reset(struct scsi_cmnd *SCpnt)
+{
struct Scsi_Host *shpnt = SCpnt->device->host;
unsigned long flags;
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 15/33][SCSI] gdth: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (13 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 14/33][SCSI] fd_mcs: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 16/33][SCSI] gdth_proc: " Richard Knutsson
` (19 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index b253b8c..3c3e271 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -144,14 +144,14 @@ static irqreturn_t gdth_interrupt(int irq, void *dev_id);
static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, int irq,
int gdth_from_wait, int* pIndex);
static int gdth_sync_event(gdth_ha_str *ha, int service, unchar index,
- Scsi_Cmnd *scp);
+ struct scsi_cmnd *scp);
static int gdth_async_event(gdth_ha_str *ha);
static void gdth_log_event(gdth_evt_data *dvr, char *buffer);
-static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority);
+static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, unchar priority);
static void gdth_next(gdth_ha_str *ha);
-static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar b);
-static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp);
+static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, unchar b);
+static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp);
static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, ushort source,
ushort idx, gdth_evt_data *evt);
static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr);
@@ -159,10 +159,10 @@ static void gdth_readapp_event(gdth_ha_str *ha, unchar application,
gdth_evt_str *estr);
static void gdth_clear_events(void);
-static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp,
+static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp,
char *buffer, ushort count, int to_buffer);
-static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp);
-static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive);
+static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp);
+static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, ushort hdrive);
static void gdth_enable_int(gdth_ha_str *ha);
static unchar gdth_get_status(gdth_ha_str *ha, int irq);
@@ -184,7 +184,7 @@ static int gdth_ioctl(struct inode *inode, struct file *filep,
static void gdth_flush(gdth_ha_str *ha);
static int gdth_halt(struct notifier_block *nb, ulong event, void *buf);
-static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *));
+static int gdth_queuecommand(struct scsi_cmnd *scp,void (*done)(struct scsi_cmnd *));
static int __gdth_queuecommand(gdth_ha_str *ha, struct scsi_cmnd *scp,
struct gdth_cmndinfo *cmndinfo);
static void gdth_scsi_done(struct scsi_cmnd *scp);
@@ -492,7 +492,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
int timeout, u32 *info)
{
gdth_ha_str *ha = shost_priv(sdev->host);
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
struct gdth_cmndinfo cmndinfo;
struct scatterlist one_sg;
DECLARE_COMPLETION_ONSTACK(wait);
@@ -2050,11 +2050,11 @@ static int gdth_analyse_hdrive(gdth_ha_str *ha, ushort hdrive)
/* command queueing/sending functions */
-static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority)
+static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, unchar priority)
{
struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
- register Scsi_Cmnd *pscp;
- register Scsi_Cmnd *nscp;
+ register struct scsi_cmnd *pscp;
+ register struct scsi_cmnd *nscp;
ulong flags;
unchar b, t;
@@ -2079,11 +2079,11 @@ static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority)
scp->SCp.ptr = NULL;
} else { /* queue not empty */
pscp = ha->req_first;
- nscp = (Scsi_Cmnd *)pscp->SCp.ptr;
+ nscp = (struct scsi_cmnd *)pscp->SCp.ptr;
/* priority: 0-highest,..,0xff-lowest */
while (nscp && gdth_cmnd_priv(nscp)->priority <= priority) {
pscp = nscp;
- nscp = (Scsi_Cmnd *)pscp->SCp.ptr;
+ nscp = (struct scsi_cmnd *)pscp->SCp.ptr;
}
pscp->SCp.ptr = (char *)scp;
scp->SCp.ptr = (char *)nscp;
@@ -2092,7 +2092,7 @@ static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority)
#ifdef GDTH_STATISTICS
flags = 0;
- for (nscp=ha->req_first; nscp; nscp=(Scsi_Cmnd*)nscp->SCp.ptr)
+ for (nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr)
++flags;
if (max_rq < flags) {
max_rq = flags;
@@ -2103,8 +2103,8 @@ static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar priority)
static void gdth_next(gdth_ha_str *ha)
{
- register Scsi_Cmnd *pscp;
- register Scsi_Cmnd *nscp;
+ register struct scsi_cmnd *pscp;
+ register struct scsi_cmnd *nscp;
unchar b, t, l, firsttime;
unchar this_cmd, next_cmd;
ulong flags = 0;
@@ -2119,10 +2119,10 @@ static void gdth_next(gdth_ha_str *ha)
next_cmd = gdth_polling ? FALSE:TRUE;
cmd_index = 0;
- for (nscp = pscp = ha->req_first; nscp; nscp = (Scsi_Cmnd *)nscp->SCp.ptr) {
+ for (nscp = pscp = ha->req_first; nscp; nscp = (struct scsi_cmnd *)nscp->SCp.ptr) {
struct gdth_cmndinfo *nscp_cmndinfo = gdth_cmnd_priv(nscp);
- if (nscp != pscp && nscp != (Scsi_Cmnd *)pscp->SCp.ptr)
- pscp = (Scsi_Cmnd *)pscp->SCp.ptr;
+ if (nscp != pscp && nscp != (struct scsi_cmnd *)pscp->SCp.ptr)
+ pscp = (struct scsi_cmnd *)pscp->SCp.ptr;
if (!nscp_cmndinfo->internal_command) {
b = nscp->device->channel;
t = nscp->device->id;
@@ -2329,7 +2329,7 @@ static void gdth_next(gdth_ha_str *ha)
if (!this_cmd)
break;
if (nscp == ha->req_first)
- ha->req_first = pscp = (Scsi_Cmnd *)nscp->SCp.ptr;
+ ha->req_first = pscp = (struct scsi_cmnd *)nscp->SCp.ptr;
else
pscp->SCp.ptr = nscp->SCp.ptr;
if (!next_cmd)
@@ -2354,7 +2354,7 @@ static void gdth_next(gdth_ha_str *ha)
* gdth_copy_internal_data() - copy to/from a buffer onto a scsi_cmnd's
* buffers, kmap_atomic() as needed.
*/
-static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp,
+static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp,
char *buffer, ushort count, int to_buffer)
{
ushort cpcount,i, max_sg = gdth_sg_count(scp);
@@ -2399,7 +2399,7 @@ static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp,
}
}
-static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp)
+static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp)
{
unchar t;
gdth_inq_data inq;
@@ -2501,7 +2501,7 @@ static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp)
return 0;
}
-static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive)
+static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, ushort hdrive)
{
register gdth_cmd_str *cmdp;
struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
@@ -2676,7 +2676,7 @@ static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive)
return cmd_index;
}
-static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar b)
+static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, unchar b)
{
register gdth_cmd_str *cmdp;
ushort i;
@@ -2849,7 +2849,7 @@ static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, unchar b)
return cmd_index;
}
-static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp)
+static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp)
{
register gdth_cmd_str *cmdp;
int cmd_index;
@@ -3042,7 +3042,7 @@ static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, int irq,
gdt6m_dpram_str __iomem *dp6m_ptr = NULL;
gdt6_dpram_str __iomem *dp6_ptr;
gdt2_dpram_str __iomem *dp2_ptr;
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
int rval, i;
unchar IStatus;
ushort Service;
@@ -3300,7 +3300,7 @@ static irqreturn_t gdth_interrupt(int irq, void *dev_id)
}
static int gdth_sync_event(gdth_ha_str *ha, int service, unchar index,
- Scsi_Cmnd *scp)
+ struct scsi_cmnd *scp)
{
gdth_msg_str *msg;
gdth_cmd_str *cmdp;
@@ -3789,7 +3789,7 @@ static void gdth_log_event(gdth_evt_data *dvr, char *buffer)
static void gdth_timeout(ulong data)
{
ulong32 i;
- Scsi_Cmnd *nscp;
+ struct scsi_cmnd *nscp;
gdth_ha_str *ha;
ulong flags;
@@ -3800,7 +3800,7 @@ static void gdth_timeout(ulong data)
if (ha->cmd_tab[i].cmnd != UNUSED_CMND)
++act_stats;
- for (act_rq=0,nscp=ha->req_first; nscp; nscp=(Scsi_Cmnd*)nscp->SCp.ptr)
+ for (act_rq=0,nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr)
++act_rq;
TRACE2(("gdth_to(): ints %d, ios %d, act_stats %d, act_rq %d\n",
@@ -3938,12 +3938,12 @@ static const char *gdth_info(struct Scsi_Host *shp)
return ((const char *)ha->binfo.type_string);
}
-static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
+static int gdth_eh_bus_reset(struct scsi_cmnd *scp)
{
gdth_ha_str *ha = shost_priv(scp->device->host);
int i;
ulong flags;
- Scsi_Cmnd *cmnd;
+ struct scsi_cmnd *cmnd;
unchar b;
TRACE2(("gdth_eh_bus_reset()\n"));
@@ -4487,7 +4487,7 @@ static int gdth_ioctl(struct inode *inode, struct file *filep,
unsigned int cmd, unsigned long arg)
{
gdth_ha_str *ha;
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
ulong flags;
char cmnd[MAX_COMMAND_SIZE];
void __user *argp = (void __user *)arg;
diff --git a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h
index 1434c6b..1594fc8 100644
--- a/drivers/scsi/gdth.h
+++ b/drivers/scsi/gdth.h
@@ -170,9 +170,9 @@
#define BIGSECS 63 /* mapping 255*63 */
/* special command ptr. */
-#define UNUSED_CMND ((Scsi_Cmnd *)-1)
-#define INTERNAL_CMND ((Scsi_Cmnd *)-2)
-#define SCREEN_CMND ((Scsi_Cmnd *)-3)
+#define UNUSED_CMND ((struct scsi_cmnd *)-1)
+#define INTERNAL_CMND ((struct scsi_cmnd *)-2)
+#define SCREEN_CMND ((struct scsi_cmnd *)-3)
#define SPECIAL_SCP(p) (p==UNUSED_CMND || p==INTERNAL_CMND || p==SCREEN_CMND)
/* controller services */
@@ -880,7 +880,7 @@ typedef struct {
ushort service; /* service/firmware ver./.. */
ulong32 info;
ulong32 info2; /* additional info */
- Scsi_Cmnd *req_first; /* top of request queue */
+ struct scsi_cmnd *req_first; /* top of request queue */
struct {
unchar present; /* Flag: host drive present? */
unchar is_logdrv; /* Flag: log. drive (master)? */
@@ -909,7 +909,7 @@ typedef struct {
ulong32 id_list[MAXID]; /* IDs of the phys. devices */
} raw[MAXBUS]; /* SCSI channels */
struct {
- Scsi_Cmnd *cmnd; /* pending request */
+ struct scsi_cmnd *cmnd; /* pending request */
ushort service; /* service */
} cmd_tab[GDTH_MAXCMDS]; /* table of pend. requests */
struct gdth_cmndinfo { /* per-command private info */
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 16/33][SCSI] gdth_proc: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (14 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 15/33][SCSI] gdth: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 17/33][SCSI] g_NCR5380: " Richard Knutsson
` (18 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
index de57734..07af36c 100644
--- a/drivers/scsi/gdth_proc.c
+++ b/drivers/scsi/gdth_proc.c
@@ -727,7 +727,7 @@ static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id)
{
ulong flags;
int i;
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
struct gdth_cmndinfo *cmndinfo;
unchar b, t;
@@ -754,12 +754,12 @@ static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id)
static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id)
{
ulong flags;
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
unchar b, t;
spin_lock_irqsave(&ha->smp_lock, flags);
- for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
+ for (scp = ha->req_first; scp; scp = (struct scsi_cmnd *)scp->SCp.ptr) {
struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
if (!cmndinfo->internal_command) {
b = scp->device->channel;
@@ -776,12 +776,12 @@ static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id)
static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id)
{
ulong flags;
- Scsi_Cmnd *scp;
+ struct scsi_cmnd *scp;
unchar b, t;
spin_lock_irqsave(&ha->smp_lock, flags);
- for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
+ for (scp = ha->req_first; scp; scp = (struct scsi_cmnd *)scp->SCp.ptr) {
struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
if (!cmndinfo->internal_command) {
b = scp->device->channel;
@@ -795,7 +795,7 @@ static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id)
spin_unlock_irqrestore(&ha->smp_lock, flags);
}
-static int gdth_update_timeout(Scsi_Cmnd *scp, int timeout)
+static int gdth_update_timeout(struct scsi_cmnd *scp, int timeout)
{
int oldto;
diff --git a/drivers/scsi/gdth_proc.h b/drivers/scsi/gdth_proc.h
index 45e6fda..09dfa60 100644
--- a/drivers/scsi/gdth_proc.h
+++ b/drivers/scsi/gdth_proc.h
@@ -22,7 +22,7 @@ static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr)
static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id);
static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id);
static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id);
-static int gdth_update_timeout(Scsi_Cmnd *scp, int timeout);
+static int gdth_update_timeout(struct scsi_cmnd *scp, int timeout);
#endif
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 17/33][SCSI] g_NCR5380: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (15 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 16/33][SCSI] gdth_proc: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 18/33][SCSI] ibmmca: " Richard Knutsson
` (17 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 75585a5..5303e1d 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -774,7 +774,7 @@ static int sprint_command(char *buffer, int len, unsigned char *command)
* Print out the target and command data in hex
*/
-static int sprint_Scsi_Cmnd(char *buffer, int len, Scsi_Cmnd * cmd)
+static int sprint_Scsi_Cmnd(char *buffer, int len, struct scsi_cmnd *cmd)
{
int start = len;
PRINTP("host number %d destination target %d, lun %d\n" ANDP cmd->device->host->host_no ANDP cmd->device->id ANDP cmd->device->lun);
@@ -807,7 +807,7 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c
unsigned long flags;
unsigned char status;
int i;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
struct NCR5380_hostdata *hostdata;
#ifdef NCR5380_STATS
struct scsi_device *dev;
@@ -886,17 +886,17 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c
if (!hostdata->connected) {
PRINTP("No currently connected command\n");
} else {
- len += sprint_Scsi_Cmnd(buffer, len, (Scsi_Cmnd *) hostdata->connected);
+ len += sprint_Scsi_Cmnd(buffer, len, (struct scsi_cmnd *) hostdata->connected);
}
PRINTP("issue_queue\n");
- for (ptr = (Scsi_Cmnd *) hostdata->issue_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble)
+ for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
len += sprint_Scsi_Cmnd(buffer, len, ptr);
PRINTP("disconnected_queue\n");
- for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble)
+ for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
len += sprint_Scsi_Cmnd(buffer, len, ptr);
*start = buffer + offset;
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
index df0b3f6..a49e789 100644
--- a/drivers/scsi/g_NCR5380.h
+++ b/drivers/scsi/g_NCR5380.h
@@ -43,11 +43,11 @@
#endif
#ifndef ASM
-static int generic_NCR5380_abort(Scsi_Cmnd *);
+static int generic_NCR5380_abort(struct scsi_cmnd *);
static int generic_NCR5380_detect(struct scsi_host_template *);
static int generic_NCR5380_release_resources(struct Scsi_Host *);
-static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int generic_NCR5380_bus_reset(Scsi_Cmnd *);
+static int generic_NCR5380_queue_command(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int generic_NCR5380_bus_reset(struct scsi_cmnd *);
static const char* generic_NCR5380_info(struct Scsi_Host *);
#ifndef CMD_PER_LUN
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 18/33][SCSI] ibmmca: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (16 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 17/33][SCSI] g_NCR5380: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 19/33][SCSI] ibmvscsi: " Richard Knutsson
` (16 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
index db004a4..5863d70 100644
--- a/drivers/scsi/ibmmca.c
+++ b/drivers/scsi/ibmmca.c
@@ -39,9 +39,9 @@
#include <scsi/scsi_host.h>
/* Common forward declarations for all Linux-versions: */
-static int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
-static int ibmmca_abort (Scsi_Cmnd *);
-static int ibmmca_host_reset (Scsi_Cmnd *);
+static int ibmmca_queuecommand(struct scsi_cmnd *, void (*done) (struct scsi_cmnd *));
+static int ibmmca_abort(struct scsi_cmnd *);
+static int ibmmca_host_reset(struct scsi_cmnd *);
static int ibmmca_biosparam (struct scsi_device *, struct block_device *, sector_t, int *);
static int ibmmca_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, off_t offset, int length, int inout);
@@ -315,7 +315,7 @@ struct logical_device {
struct im_tsb tsb; /* SCSI command complete status block structure */
struct im_sge sge[16]; /* scatter gather list structure */
unsigned char buf[256]; /* SCSI command return data buffer */
- Scsi_Cmnd *cmd; /* SCSI-command that is currently in progress */
+ struct scsi_cmnd *cmd; /* SCSI-command that is currently in progress */
int device_type; /* type of the SCSI-device. See include/scsi/scsi.h
for interpretation of the possible values */
int block_length; /* blocksize of a particular logical SCSI-device */
@@ -476,7 +476,7 @@ static char ibm_ansi_order = 0;
#endif
static void issue_cmd(struct Scsi_Host *, unsigned long, unsigned char);
-static void internal_done(Scsi_Cmnd * cmd);
+static void internal_done(struct scsi_cmnd *cmd);
static void check_devices(struct Scsi_Host *, int);
static int immediate_assign(struct Scsi_Host *, unsigned int, unsigned int, unsigned int, unsigned int);
static int immediate_feature(struct Scsi_Host *, unsigned int, unsigned int);
@@ -503,7 +503,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id)
unsigned int cmd_result;
unsigned int ldn;
unsigned long flags;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
int lastSCSI;
struct device *dev = dev_id;
struct Scsi_Host *shpnt = dev_get_drvdata(dev);
@@ -726,7 +726,7 @@ static void issue_cmd(struct Scsi_Host *shpnt, unsigned long cmd_reg,
spin_unlock_irqrestore(shpnt->host_lock, flags);
}
-static void internal_done(Scsi_Cmnd * cmd)
+static void internal_done(struct scsi_cmnd *cmd)
{
cmd->SCp.Status++;
return;
@@ -1692,7 +1692,7 @@ static int __devexit ibmmca_remove(struct device *dev)
}
/* The following routine is the SCSI command queue for the midlevel driver */
-static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int ibmmca_queuecommand(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
{
unsigned int ldn;
unsigned int scsi_cmd;
@@ -1997,7 +1997,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
return 0;
}
-static int __ibmmca_abort(Scsi_Cmnd * cmd)
+static int __ibmmca_abort(struct scsi_cmnd *cmd)
{
/* Abort does not work, as the adapter never generates an interrupt on
* whatever situation is simulated, even when really pending commands
@@ -2005,7 +2005,7 @@ static int __ibmmca_abort(Scsi_Cmnd * cmd)
struct Scsi_Host *shpnt;
unsigned int ldn;
- void (*saved_done) (Scsi_Cmnd *);
+ void (*saved_done) (struct scsi_cmnd *);
int target;
int max_pun;
unsigned long imm_command;
@@ -2091,7 +2091,7 @@ static int __ibmmca_abort(Scsi_Cmnd * cmd)
}
}
-static int ibmmca_abort(Scsi_Cmnd * cmd)
+static int ibmmca_abort(struct scsi_cmnd *cmd)
{
struct Scsi_Host *shpnt = cmd->device->host;
int rc;
@@ -2103,10 +2103,10 @@ static int ibmmca_abort(Scsi_Cmnd * cmd)
return rc;
}
-static int __ibmmca_host_reset(Scsi_Cmnd * cmd)
+static int __ibmmca_host_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *shpnt;
- Scsi_Cmnd *cmd_aid;
+ struct scsi_cmnd *cmd_aid;
int ticks, i;
unsigned long imm_command;
@@ -2183,7 +2183,7 @@ static int __ibmmca_host_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int ibmmca_host_reset(Scsi_Cmnd * cmd)
+static int ibmmca_host_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *shpnt = cmd->device->host;
int rc;
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 19/33][SCSI] ibmvscsi: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (17 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 18/33][SCSI] ibmmca: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 20/33][SCSI] in2000: " Richard Knutsson
` (15 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 5f2396c..d517f32 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -375,7 +375,7 @@ static int map_sg_list(struct scsi_cmnd *cmd, int nseg,
/**
* map_sg_data: - Maps dma for a scatterlist and initializes decriptor fields
- * @cmd: Scsi_Cmnd with the scatterlist
+ * @cmd: scsi_cmnd with the scatterlist
* @srp_cmd: srp_cmd that contains the memory descriptor
* @dev: device for which to map dma memory
*
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 20/33][SCSI] in2000: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (18 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 19/33][SCSI] ibmvscsi: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 21/33][SCSI] mac_esp: " Richard Knutsson
` (14 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index c8b452f..05737ef 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -255,7 +255,7 @@ static unsigned long read_3393_count(struct IN2000_hostdata *hostdata)
* will be a DATA_OUT phase with this command, false otherwise.
* (Thanks to Joerg Dorchain for the research and suggestion.)
*/
-static int is_dir_out(Scsi_Cmnd * cmd)
+static int is_dir_out(struct scsi_cmnd *cmd)
{
switch (cmd->cmnd[0]) {
case WRITE_6:
@@ -334,18 +334,18 @@ static uchar calc_sync_xfer(unsigned int period, unsigned int offset)
static void in2000_execute(struct Scsi_Host *instance);
-static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int in2000_queuecommand(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp;
+ struct scsi_cmnd *tmp;
instance = cmd->device->host;
hostdata = (struct IN2000_hostdata *) instance->hostdata;
DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->serial_number))
-/* Set up a few fields in the Scsi_Cmnd structure for our own use:
+/* Set up a few fields in the scsi_cmnd structure for our own use:
* - host_scribble is the pointer to the next cmd in the input queue
* - scsi_done points to the routine we call when a cmd is finished
* - result is what you'd expect
@@ -417,7 +417,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
cmd->host_scribble = (uchar *) hostdata->input_Q;
hostdata->input_Q = cmd;
} else { /* find the end of the queue */
- for (tmp = (Scsi_Cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble);
+ for (tmp = (struct scsi_cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble);
tmp->host_scribble = (uchar *) cmd;
}
@@ -444,7 +444,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
static void in2000_execute(struct Scsi_Host *instance)
{
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *cmd, *prev;
+ struct scsi_cmnd *cmd, *prev;
int i;
unsigned short *sp;
unsigned short f;
@@ -467,13 +467,13 @@ static void in2000_execute(struct Scsi_Host *instance)
* for an idle target/lun.
*/
- cmd = (Scsi_Cmnd *) hostdata->input_Q;
+ cmd = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (cmd) {
if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun)))
break;
prev = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* quit if queue empty or all possible targets are busy */
@@ -490,7 +490,7 @@ static void in2000_execute(struct Scsi_Host *instance)
if (prev)
prev->host_scribble = cmd->host_scribble;
else
- hostdata->input_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->input_Q = (struct scsi_cmnd *) cmd->host_scribble;
#ifdef PROC_STATISTICS
hostdata->cmd_cnt[cmd->device->id]++;
@@ -539,9 +539,9 @@ static void in2000_execute(struct Scsi_Host *instance)
goto yes;
if (!(hostdata->input_Q)) /* input_Q empty? */
goto no;
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble) {
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble) {
if ((prev->device->id != cmd->device->id) || (prev->device->lun != cmd->device->lun)) {
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble)
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble)
prev->SCp.phase = 1;
goto yes;
}
@@ -743,7 +743,7 @@ static void transfer_pio(uchar * buf, int cnt, int data_in_dir, struct IN2000_ho
-static void transfer_bytes(Scsi_Cmnd * cmd, int data_in_dir)
+static void transfer_bytes(struct scsi_cmnd *cmd, int data_in_dir)
{
struct IN2000_hostdata *hostdata;
unsigned short *sp;
@@ -833,7 +833,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
{
struct Scsi_Host *instance = dev_id;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *patch, *cmd;
+ struct scsi_cmnd *patch, *cmd;
uchar asr, sr, phs, id, lun, *ucp, msg;
int i, j;
unsigned long length;
@@ -909,7 +909,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* (Big thanks to Bill Earnest for getting me out of the mud in here.)
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
CHECK_NULL(cmd, "fifo_int")
if (hostdata->fifo == FI_FIFO_READING) {
@@ -991,7 +991,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* detailed info from FIFO_READING and FIFO_WRITING (see below).
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear the interrupt */
phs = read_3393(hostdata, WD_COMMAND_PHASE);
@@ -1068,7 +1068,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->state == S_RUNNING_LEVEL2)
hostdata->connected = NULL;
else {
- cmd = (Scsi_Cmnd *) hostdata->selecting; /* get a valid cmd */
+ cmd = (struct scsi_cmnd *) hostdata->selecting; /* get a valid cmd */
CHECK_NULL(cmd, "csr_timeout")
hostdata->selecting = NULL;
}
@@ -1090,7 +1090,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
case CSR_SELECT:
DB(DB_INTR, printk("SELECT"))
- hostdata->connected = cmd = (Scsi_Cmnd *) hostdata->selecting;
+ hostdata->connected = cmd = (struct scsi_cmnd *) hostdata->selecting;
CHECK_NULL(cmd, "csr_select")
hostdata->selecting = NULL;
@@ -1491,7 +1491,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->level2 <= L2_NONE) {
if (hostdata->selecting) {
- cmd = (Scsi_Cmnd *) hostdata->selecting;
+ cmd = (struct scsi_cmnd *) hostdata->selecting;
hostdata->selecting = NULL;
hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
cmd->host_scribble = (uchar *) hostdata->input_Q;
@@ -1532,13 +1532,13 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
/* Now we look for the command that's reconnecting. */
- cmd = (Scsi_Cmnd *) hostdata->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hostdata->disconnected_Q;
patch = NULL;
while (cmd) {
if (id == cmd->device->id && lun == cmd->device->lun)
break;
patch = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* Hmm. Couldn't find a valid command.... What to do? */
@@ -1553,7 +1553,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (patch)
patch->host_scribble = cmd->host_scribble;
else
- hostdata->disconnected_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->disconnected_Q = (struct scsi_cmnd *) cmd->host_scribble;
hostdata->connected = cmd;
/* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]'
@@ -1639,7 +1639,7 @@ static int reset_hardware(struct Scsi_Host *instance, int type)
-static int in2000_bus_reset(Scsi_Cmnd * cmd)
+static int in2000_bus_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
@@ -1675,11 +1675,11 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int __in2000_abort(Scsi_Cmnd * cmd)
+static int __in2000_abort(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp, *prev;
+ struct scsi_cmnd *tmp, *prev;
uchar sr, asr;
unsigned long timeout;
@@ -1694,7 +1694,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* from the inout_Q.
*/
- tmp = (Scsi_Cmnd *) hostdata->input_Q;
+ tmp = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (tmp) {
if (tmp == cmd) {
@@ -1707,7 +1707,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
prev = tmp;
- tmp = (Scsi_Cmnd *) tmp->host_scribble;
+ tmp = (struct scsi_cmnd *) tmp->host_scribble;
}
/*
@@ -1774,7 +1774,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* an ABORT_SNOOZE and hope for the best...
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_Q; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_Q; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd == tmp) {
printk(KERN_DEBUG "scsi%d: unable to abort disconnected command.\n", instance->host_no);
return FAILED;
@@ -1796,7 +1796,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int in2000_abort(Scsi_Cmnd * cmd)
+static int in2000_abort(struct scsi_cmnd *cmd)
{
int rc;
@@ -2175,7 +2175,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
char tbuf[128];
unsigned long flags;
struct IN2000_hostdata *hd;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
int x, i;
static int stop = 0;
@@ -2267,27 +2267,27 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
if (hd->proc & PR_CONNECTED) {
strcat(bp, "\nconnected: ");
if (hd->connected) {
- cmd = (Scsi_Cmnd *) hd->connected;
+ cmd = (struct scsi_cmnd *) hd->connected;
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
}
}
if (hd->proc & PR_INPUTQ) {
strcat(bp, "\ninput_Q: ");
- cmd = (Scsi_Cmnd *) hd->input_Q;
+ cmd = (struct scsi_cmnd *) hd->input_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_DISCQ) {
strcat(bp, "\ndisconnected_Q:");
- cmd = (Scsi_Cmnd *) hd->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hd->disconnected_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_TEST) {
diff --git a/drivers/scsi/in2000.h b/drivers/scsi/in2000.h
index 0fb8b06..2f3085f 100644
--- a/drivers/scsi/in2000.h
+++ b/drivers/scsi/in2000.h
@@ -283,10 +283,10 @@ struct IN2000_hostdata {
unsigned int dip_switch; /* dip switch settings */
unsigned int hrev; /* hardware revision of card */
volatile uchar busy[8]; /* index = target, bit = lun */
- volatile Scsi_Cmnd *input_Q; /* commands waiting to be started */
- volatile Scsi_Cmnd *selecting; /* trying to select this command */
- volatile Scsi_Cmnd *connected; /* currently connected command */
- volatile Scsi_Cmnd *disconnected_Q;/* commands waiting for reconnect */
+ volatile struct scsi_cmnd *input_Q; /* commands waiting to be started */
+ volatile struct scsi_cmnd *selecting; /* trying to select this command */
+ volatile struct scsi_cmnd *connected; /* currently connected command */
+ volatile struct scsi_cmnd *disconnected_Q;/* commands waiting for reconnect */
uchar state; /* what we are currently doing */
uchar fifo; /* what the FIFO is up to */
uchar level2; /* extent to which Level-2 commands are used */
@@ -396,12 +396,12 @@ struct IN2000_hostdata {
flags)
static int in2000_detect(struct scsi_host_template *) in2000__INIT;
-static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int in2000_abort(Scsi_Cmnd *);
+static int in2000_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int in2000_abort(struct scsi_cmnd *);
static void in2000_setup(char *, int *) in2000__INIT;
static int in2000_biosparam(struct scsi_device *, struct block_device *,
sector_t, int *);
-static int in2000_bus_reset(Scsi_Cmnd *);
+static int in2000_bus_reset(struct scsi_cmnd *);
#define IN2000_CAN_Q 16
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 21/33][SCSI] mac_esp: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (19 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 20/33][SCSI] in2000: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 22/33][SCSI] mca_53c9x: " Richard Knutsson
` (13 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors.
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index bcb4902..85f3d47 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -47,7 +47,7 @@ extern void esp_handle(struct NCR_ESP *esp);
extern void mac_esp_intr(int irq, void *dev_id);
static int dma_bytes_sent(struct NCR_ESP * esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP * esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP * esp);
static void dma_init_read(struct NCR_ESP * esp, char * vaddress, int length);
static void dma_init_write(struct NCR_ESP * esp, char * vaddress, int length);
@@ -582,7 +582,7 @@ static int dma_bytes_sent(struct NCR_ESP * esp, int fifo_count)
* is ever implemented. Returning 0 here will use PIO.
*/
-static int dma_can_transfer(struct NCR_ESP * esp, Scsi_Cmnd * sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
unsigned long sz = sp->SCp.this_residual;
#if 0 /* no DMA yet; make conditional */
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 22/33][SCSI] mca_53c9x: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (20 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 21/33][SCSI] mac_esp: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 23/33][SCSI] megaraid: " Richard Knutsson
` (12 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/mca_53c9x.c b/drivers/scsi/mca_53c9x.c
index d693d0f..5dbc259 100644
--- a/drivers/scsi/mca_53c9x.c
+++ b/drivers/scsi/mca_53c9x.c
@@ -77,7 +77,7 @@
}
static int dma_bytes_sent(struct NCR_ESP *, int);
-static int dma_can_transfer(struct NCR_ESP *, Scsi_Cmnd *);
+static int dma_can_transfer(struct NCR_ESP *, struct scsi_cmnd *);
static void dma_dump_state(struct NCR_ESP *);
static void dma_init_read(struct NCR_ESP *, __u32, int);
static void dma_init_write(struct NCR_ESP *, __u32, int);
@@ -313,7 +313,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
/*
* The MCA dma channels can only do up to 128K bytes at a time.
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 23/33][SCSI] megaraid: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (21 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 22/33][SCSI] mca_53c9x: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 24/33][SCSI] NCR5380: " Richard Knutsson
` (11 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors.
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 66c6520..9353472 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -359,7 +359,7 @@ mega_runpendq(adapter_t *adapter)
* The command queuing entry point for the mid-layer.
*/
static int
-megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
+megaraid_queue(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
{
adapter_t *adapter;
scb_t *scb;
@@ -411,7 +411,7 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
* commands.
*/
static inline scb_t *
-mega_allocate_scb(adapter_t *adapter, Scsi_Cmnd *cmd)
+mega_allocate_scb(adapter_t *adapter, struct scsi_cmnd *cmd)
{
struct list_head *head = &adapter->free_list;
scb_t *scb;
@@ -443,7 +443,7 @@ mega_allocate_scb(adapter_t *adapter, Scsi_Cmnd *cmd)
* and the channel number.
*/
static inline int
-mega_get_ldrv_num(adapter_t *adapter, Scsi_Cmnd *cmd, int channel)
+mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel)
{
int tgt;
int ldrv_num;
@@ -506,7 +506,7 @@ mega_get_ldrv_num(adapter_t *adapter, Scsi_Cmnd *cmd, int channel)
* boot settings.
*/
static scb_t *
-mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
+mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
{
mega_ext_passthru *epthru;
mega_passthru *pthru;
@@ -944,7 +944,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
* prepare a command for the scsi physical devices.
*/
static mega_passthru *
-mega_prepare_passthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd,
+mega_prepare_passthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd,
int channel, int target)
{
mega_passthru *pthru;
@@ -1008,7 +1008,7 @@ mega_prepare_passthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd,
* commands for devices which can take extended CDBs (>10 bytes)
*/
static mega_ext_passthru *
-mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd,
+mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd,
int channel, int target)
{
mega_ext_passthru *epthru;
@@ -1410,7 +1410,7 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int nstatus, int status)
{
mega_ext_passthru *epthru = NULL;
struct scatterlist *sgl;
- Scsi_Cmnd *cmd = NULL;
+ struct scsi_cmnd *cmd = NULL;
mega_passthru *pthru = NULL;
mbox_t *mbox = NULL;
u8 c;
@@ -1662,14 +1662,14 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int nstatus, int status)
static void
mega_rundoneq (adapter_t *adapter)
{
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
struct list_head *pos;
list_for_each(pos, &adapter->completed_list) {
struct scsi_pointer* spos = (struct scsi_pointer *)pos;
- cmd = list_entry(spos, Scsi_Cmnd, SCp);
+ cmd = list_entry(spos, struct scsi_cmnd, SCp);
cmd->scsi_done(cmd);
}
@@ -1732,7 +1732,7 @@ static int
mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
{
struct scatterlist *sg;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
int sgcnt;
int idx;
@@ -1879,7 +1879,7 @@ megaraid_info(struct Scsi_Host *host)
* aborted. All the commands issued to the F/W must complete.
*/
static int
-megaraid_abort(Scsi_Cmnd *cmd)
+megaraid_abort(struct scsi_cmnd *cmd)
{
adapter_t *adapter;
int rval;
@@ -1944,7 +1944,7 @@ megaraid_reset(struct scsi_cmnd *cmd)
* issued to the controller, abort/reset it. Otherwise return failure
*/
static int
-megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
+megaraid_abort_and_reset(adapter_t *adapter, struct scsi_cmnd *cmd, int aor)
{
struct list_head *pos, *next;
scb_t *scb;
@@ -4396,7 +4396,7 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt,
static int
mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
{
- Scsi_Cmnd *scmd;
+ struct scsi_cmnd *scmd;
struct scsi_device *sdev;
scb_t *scb;
int rval;
@@ -4412,7 +4412,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
memset(scb, 0, sizeof(scb_t));
scmd = &adapter->int_scmd;
- memset(scmd, 0, sizeof(Scsi_Cmnd));
+ memset(scmd, 0, sizeof(struct scsi_cmnd));
sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL);
scmd->device = sdev;
@@ -4466,7 +4466,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
* Callback routine for internal commands.
*/
static void
-mega_internal_done(Scsi_Cmnd *scmd)
+mega_internal_done(struct scsi_cmnd *scmd)
{
adapter_t *adapter;
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
index ee70bd4..a20a52a 100644
--- a/drivers/scsi/megaraid.h
+++ b/drivers/scsi/megaraid.h
@@ -225,7 +225,7 @@ typedef struct {
u32 dma_type;
u32 dma_direction;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
dma_addr_t dma_h_bulkdata;
dma_addr_t dma_h_sgdata;
@@ -889,7 +889,7 @@ typedef struct {
u8 sglen; /* f/w supported scatter-gather list length */
scb_t int_scb;
- Scsi_Cmnd int_scmd;
+ struct scsi_cmnd int_scmd;
struct mutex int_mtx; /* To synchronize the internal
commands */
struct completion int_waitq; /* wait queue for internal
@@ -987,8 +987,8 @@ static int mega_query_adapter(adapter_t *);
static int issue_scb(adapter_t *, scb_t *);
static int mega_setup_mailbox(adapter_t *);
-static int megaraid_queue (Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
-static scb_t * mega_build_cmd(adapter_t *, Scsi_Cmnd *, int *);
+static int megaraid_queue (struct scsi_cmnd *, void (*)(struct scsi_cmnd *));
+static scb_t *mega_build_cmd(adapter_t *, struct scsi_cmnd *, int *);
static void __mega_runpendq(adapter_t *);
static int issue_scb_block(adapter_t *, u_char *);
@@ -997,9 +997,9 @@ static irqreturn_t megaraid_isr_iomapped(int, void *);
static void mega_free_scb(adapter_t *, scb_t *);
-static int megaraid_abort(Scsi_Cmnd *);
-static int megaraid_reset(Scsi_Cmnd *);
-static int megaraid_abort_and_reset(adapter_t *, Scsi_Cmnd *, int);
+static int megaraid_abort(struct scsi_cmnd *);
+static int megaraid_reset(struct scsi_cmnd *);
+static int megaraid_abort_and_reset(adapter_t *, struct scsi_cmnd *, int);
static int megaraid_biosparam(struct scsi_device *, struct block_device *,
sector_t, int []);
@@ -1047,9 +1047,9 @@ static int mega_internal_dev_inquiry(adapter_t *, u8, u8, dma_addr_t);
static int mega_support_ext_cdb(adapter_t *);
static mega_passthru* mega_prepare_passthru(adapter_t *, scb_t *,
- Scsi_Cmnd *, int, int);
+ struct scsi_cmnd *, int, int);
static mega_ext_passthru* mega_prepare_extpassthru(adapter_t *,
- scb_t *, Scsi_Cmnd *, int, int);
+ scb_t *, struct scsi_cmnd *, int, int);
static void mega_enum_raid_scsi(adapter_t *);
static void mega_get_boot_drv(adapter_t *);
static int mega_support_random_del(adapter_t *);
@@ -1057,7 +1057,7 @@ static int mega_del_logdrv(adapter_t *, int);
static int mega_do_del_logdrv(adapter_t *, int);
static void mega_get_max_sgl(adapter_t *);
static int mega_internal_command(adapter_t *, megacmd_t *, mega_passthru *);
-static void mega_internal_done(Scsi_Cmnd *);
+static void mega_internal_done(struct scsi_cmnd *);
static int mega_support_cluster(adapter_t *);
#endif
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 24/33][SCSI] NCR5380: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (22 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 23/33][SCSI] megaraid: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 25/33][SCSI] NCR53c406a: " Richard Knutsson
` (10 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning, and etc).
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 2597209..6c09976 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -288,7 +288,7 @@ static void do_reset(struct Scsi_Host *host);
* Set up the internal fields in the SCSI command.
*/
-static __inline__ void initialize_SCp(Scsi_Cmnd * cmd)
+static inline void initialize_SCp(struct scsi_cmnd *cmd)
{
/*
* Initialize the Scsi Pointer field so that all of the commands in the
@@ -698,7 +698,7 @@ static void NCR5380_print_status(struct Scsi_Host *instance)
#undef SPRINTF
#define SPRINTF(args...) do { if(pos < buffer + length-80) pos += sprintf(pos, ## args); } while(0)
static
-char *lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, char *pos, char *buffer, int length);
+char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer, int length);
static
char *lprint_command(unsigned char *cmd, char *pos, char *buffer, int len);
static
@@ -709,7 +709,7 @@ static int __maybe_unused NCR5380_proc_info(struct Scsi_Host *instance,
{
char *pos = buffer;
struct NCR5380_hostdata *hostdata;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
hostdata = (struct NCR5380_hostdata *) instance->hostdata;
@@ -755,13 +755,13 @@ static int __maybe_unused NCR5380_proc_info(struct Scsi_Host *instance,
if (!hostdata->connected)
SPRINTF("scsi%d: no currently connected command\n", instance->host_no);
else
- pos = lprint_Scsi_Cmnd((Scsi_Cmnd *) hostdata->connected, pos, buffer, length);
+ pos = lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, pos, buffer, length);
SPRINTF("scsi%d: issue_queue\n", instance->host_no);
- for (ptr = (Scsi_Cmnd *) hostdata->issue_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble)
+ for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
pos = lprint_Scsi_Cmnd(ptr, pos, buffer, length);
SPRINTF("scsi%d: disconnected_queue\n", instance->host_no);
- for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble)
+ for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
pos = lprint_Scsi_Cmnd(ptr, pos, buffer, length);
spin_unlock_irq(instance->host_lock);
@@ -773,7 +773,7 @@ static int __maybe_unused NCR5380_proc_info(struct Scsi_Host *instance,
return length;
}
-static char *lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, char *pos, char *buffer, int length)
+static char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer, int length)
{
SPRINTF("scsi%d : destination target %d, lun %d\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun);
SPRINTF(" command = ");
@@ -952,11 +952,11 @@ static void __devexit NCR5380_exit(struct Scsi_Host *instance)
* Locks: host lock taken by caller
*/
-static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int NCR5380_queue_command(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
{
struct Scsi_Host *instance = cmd->device->host;
struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata;
- Scsi_Cmnd *tmp;
+ struct scsi_cmnd *tmp;
#if (NDEBUG & NDEBUG_NO_WRITE)
switch (cmd->cmnd[0]) {
@@ -1009,7 +1009,7 @@ static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
cmd->host_scribble = (unsigned char *) hostdata->issue_queue;
hostdata->issue_queue = cmd;
} else {
- for (tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble);
+ for (tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble);
LIST(cmd, tmp);
tmp->host_scribble = (unsigned char *) cmd;
}
@@ -1039,7 +1039,7 @@ static void NCR5380_main(struct work_struct *work)
struct NCR5380_hostdata *hostdata =
container_of(work, struct NCR5380_hostdata, coroutine.work);
struct Scsi_Host *instance = hostdata->host;
- Scsi_Cmnd *tmp, *prev;
+ struct scsi_cmnd *tmp, *prev;
int done;
spin_lock_irq(instance->host_lock);
@@ -1052,7 +1052,7 @@ static void NCR5380_main(struct work_struct *work)
* Search through the issue_queue for a command destined
* for a target that's not busy.
*/
- for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble)
{
if (prev != tmp)
dprintk(NDEBUG_LISTS, ("MAIN tmp=%p target=%d busy=%d lun=%d\n", tmp, tmp->target, hostdata->busy[tmp->target], tmp->lun));
@@ -1063,7 +1063,7 @@ static void NCR5380_main(struct work_struct *work)
prev->host_scribble = tmp->host_scribble;
} else {
REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble);
- hostdata->issue_queue = (Scsi_Cmnd *) tmp->host_scribble;
+ hostdata->issue_queue = (struct scsi_cmnd *) tmp->host_scribble;
}
tmp->host_scribble = NULL;
@@ -1110,7 +1110,7 @@ static void NCR5380_main(struct work_struct *work)
/* exited locked */
} /* if (!hostdata->connected) */
if (hostdata->selecting) {
- tmp = (Scsi_Cmnd *) hostdata->selecting;
+ tmp = (struct scsi_cmnd *) hostdata->selecting;
/* Selection will drop and retake the lock */
if (!NCR5380_select(instance, tmp, (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
/* Ok ?? */
@@ -1238,7 +1238,7 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id)
* Update the statistical data by parsing the command in question
*/
-static void collect_stats(struct NCR5380_hostdata *hostdata, Scsi_Cmnd * cmd)
+static void collect_stats(struct NCR5380_hostdata *hostdata, struct scsi_cmnd *cmd)
{
#ifdef NCR5380_STATS
switch (cmd->cmnd[0]) {
@@ -1260,7 +1260,7 @@ static void collect_stats(struct NCR5380_hostdata *hostdata, Scsi_Cmnd * cmd)
/*
- * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd,
+ * Function : int NCR5380_select (struct Scsi_Host *instance, struct scsi_cmnd *cmd,
* int tag);
*
* Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command,
@@ -1292,7 +1292,7 @@ static void collect_stats(struct NCR5380_hostdata *hostdata, Scsi_Cmnd * cmd)
* Locks: caller holds hostdata lock in IRQ mode
*/
-static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
+static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, int tag)
{
NCR5380_local_declare();
struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata;
@@ -2098,7 +2098,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
#endif
unsigned char *data;
unsigned char phase, tmp, extended_msg[10], old_phase = 0xff;
- Scsi_Cmnd *cmd = (Scsi_Cmnd *) hostdata->connected;
+ struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected;
/* RvC: we need to set the end of the polling time */
unsigned long poll_time = jiffies + USLEEP_POLL;
@@ -2290,7 +2290,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
LIST(cmd, hostdata->issue_queue);
cmd->host_scribble = (unsigned char *)
hostdata->issue_queue;
- hostdata->issue_queue = (Scsi_Cmnd *) cmd;
+ hostdata->issue_queue = (struct scsi_cmnd *) cmd;
dprintk(NDEBUG_QUEUES, ("scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no));
} else
#endif /* def AUTOSENSE */
@@ -2491,7 +2491,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
* Function : void NCR5380_reselect (struct Scsi_Host *instance)
*
* Purpose : does reselection, initializing the instance->connected
- * field to point to the Scsi_Cmnd for which the I_T_L or I_T_L_Q
+ * field to point to the scsi_cmnd for which the I_T_L or I_T_L_Q
* nexus has been reestablished,
*
* Inputs : instance - this instance of the NCR5380.
@@ -2508,7 +2508,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {
int len;
unsigned char msg[3];
unsigned char *data;
- Scsi_Cmnd *tmp = NULL, *prev;
+ struct scsi_cmnd *tmp = NULL, *prev;
int abort = 0;
NCR5380_setup(instance);
@@ -2574,7 +2574,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble)
if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun)
) {
if (prev) {
@@ -2582,7 +2582,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {
prev->host_scribble = tmp->host_scribble;
} else {
REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble);
- hostdata->disconnected_queue = (Scsi_Cmnd *) tmp->host_scribble;
+ hostdata->disconnected_queue = (struct scsi_cmnd *) tmp->host_scribble;
}
tmp->host_scribble = NULL;
break;
@@ -2613,7 +2613,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {
*
* Inputs : instance - this instance of the NCR5380.
*
- * Returns : pointer to the Scsi_Cmnd structure for which the I_T_L
+ * Returns : pointer to the scsi_cmnd structure for which the I_T_L
* nexus has been reestablished, on failure NULL is returned.
*/
@@ -2655,11 +2655,11 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) {
#endif /* def REAL_DMA */
/*
- * Function : int NCR5380_abort (Scsi_Cmnd *cmd)
+ * Function : int NCR5380_abort (struct scsi_cmnd *cmd)
*
* Purpose : abort a command
*
- * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the
+ * Inputs : cmd - the scsi_cmnd to abort, code - code to set the
* host byte of the result field to, if zero DID_ABORTED is
* used.
*
@@ -2673,11 +2673,12 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) {
* Locks: host lock taken by caller
*/
-static int NCR5380_abort(Scsi_Cmnd * cmd) {
+static int NCR5380_abort(struct scsi_cmnd *cmd)
+{
NCR5380_local_declare();
struct Scsi_Host *instance = cmd->device->host;
struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata;
- Scsi_Cmnd *tmp, **prev;
+ struct scsi_cmnd *tmp, **prev;
printk(KERN_WARNING "scsi%d : aborting command\n", instance->host_no);
scsi_print_command(cmd);
@@ -2726,10 +2726,10 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
*/
dprintk(NDEBUG_ABORT, ("scsi%d : abort going into loop.\n", instance->host_no));
- for (prev = (Scsi_Cmnd **) & (hostdata->issue_queue), tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (prev = (struct scsi_cmnd **) &(hostdata->issue_queue), tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd == tmp) {
REMOVE(5, *prev, tmp, tmp->host_scribble);
- (*prev) = (Scsi_Cmnd *) tmp->host_scribble;
+ (*prev) = (struct scsi_cmnd *) tmp->host_scribble;
tmp->host_scribble = NULL;
tmp->result = DID_ABORT << 16;
dprintk(NDEBUG_ABORT, ("scsi%d : abort removed command from issue queue.\n", instance->host_no));
@@ -2782,7 +2782,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
* it from the disconnected queue.
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd == tmp) {
dprintk(NDEBUG_ABORT, ("scsi%d : aborting disconnected command.\n", instance->host_no));
@@ -2792,10 +2792,10 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
do_abort(instance);
- for (prev = (Scsi_Cmnd **) & (hostdata->disconnected_queue), tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (prev = (struct scsi_cmnd **) &(hostdata->disconnected_queue), tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd == tmp) {
REMOVE(5, *prev, tmp, tmp->host_scribble);
- *prev = (Scsi_Cmnd *) tmp->host_scribble;
+ *prev = (struct scsi_cmnd *) tmp->host_scribble;
tmp->host_scribble = NULL;
tmp->result = DID_ABORT << 16;
tmp->scsi_done(tmp);
@@ -2818,7 +2818,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
/*
- * Function : int NCR5380_bus_reset (Scsi_Cmnd *cmd)
+ * Function : int NCR5380_bus_reset (struct scsi_cmnd *cmd)
*
* Purpose : reset the SCSI bus.
*
@@ -2827,7 +2827,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
* Locks: host lock taken by caller
*/
-static int NCR5380_bus_reset(Scsi_Cmnd * cmd)
+static int NCR5380_bus_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance = cmd->device->host;
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index bdc468c..ff73046 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -264,9 +264,9 @@ struct NCR5380_hostdata {
volatile int dma_len; /* requested length of DMA */
#endif
volatile unsigned char last_message; /* last message OUT */
- volatile Scsi_Cmnd *connected; /* currently connected command */
- volatile Scsi_Cmnd *issue_queue; /* waiting to be issued */
- volatile Scsi_Cmnd *disconnected_queue; /* waiting for reconnect */
+ volatile struct scsi_cmnd *connected; /* currently connected command */
+ volatile struct scsi_cmnd *issue_queue; /* waiting to be issued */
+ volatile struct scsi_cmnd *disconnected_queue; /* waiting for reconnect */
volatile int restart_select; /* we have disconnected,
used to restart
NCR5380_select() */
@@ -274,7 +274,7 @@ struct NCR5380_hostdata {
int flags;
unsigned long time_expires; /* in jiffies, set prior to sleeping */
int select_time; /* timer in select for target response */
- volatile Scsi_Cmnd *selecting;
+ volatile struct scsi_cmnd *selecting;
struct delayed_work coroutine; /* our co-routine */
#ifdef NCR5380_STATS
unsigned timebase; /* Base for time calcs */
@@ -311,14 +311,14 @@ static void __maybe_unused NCR5380_print_options(struct Scsi_Host *instance);
static void NCR5380_print_phase(struct Scsi_Host *instance);
static void NCR5380_print(struct Scsi_Host *instance);
#endif
-static int NCR5380_abort(Scsi_Cmnd * cmd);
-static int NCR5380_bus_reset(Scsi_Cmnd * cmd);
-static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
+static int NCR5380_abort(struct scsi_cmnd *cmd);
+static int NCR5380_bus_reset(struct scsi_cmnd *cmd);
+static int NCR5380_queue_command(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *));
static int __maybe_unused NCR5380_proc_info(struct Scsi_Host *instance,
char *buffer, char **start, off_t offset, int length, int inout);
static void NCR5380_reselect(struct Scsi_Host *instance);
-static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag);
+static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, int tag);
#if defined(PSEUDO_DMA) || defined(REAL_DMA) || defined(REAL_DMA_POLL)
static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
#endif
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 25/33][SCSI] NCR53c406a: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (23 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 24/33][SCSI] NCR5380: " Richard Knutsson
@ 2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 26/33][SCSI] NCR53C9x: " Richard Knutsson
` (9 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:04 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c
index 137d065..bdb2ca5 100644
--- a/drivers/scsi/NCR53c406a.c
+++ b/drivers/scsi/NCR53c406a.c
@@ -201,7 +201,7 @@ static int dma_chan;
static int fast_pio = USE_FAST_PIO;
#endif
-static Scsi_Cmnd *current_SC;
+static struct scsi_cmnd *current_SC;
static char info_msg[256];
/* ================================================================= */
@@ -693,7 +693,7 @@ static void wait_intr(void)
}
#endif
-static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int NCR53c406a_queue(struct scsi_cmnd *SCpnt, void (*done) (struct scsi_cmnd *))
{
int i;
@@ -726,7 +726,7 @@ static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
return 0;
}
-static int NCR53c406a_host_reset(Scsi_Cmnd * SCpnt)
+static int NCR53c406a_host_reset(struct scsi_cmnd *SCpnt)
{
DEB(printk("NCR53c406a_reset called\n"));
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 26/33][SCSI] NCR53C9x: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (24 preceding siblings ...)
2008-01-06 3:04 ` [PATCH 25/33][SCSI] NCR53c406a: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 27/33][SCSI] nsp32_debug: " Richard Knutsson
` (8 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 5b0efc9..edf81e3 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -278,7 +278,7 @@ static char *phase_string(int phase)
}
#ifdef DEBUG_STATE_MACHINE
-static inline void esp_advance_phase(Scsi_Cmnd *s, int newphase)
+static inline void esp_advance_phase(struct scsi_cmnd *s, int newphase)
{
ESPLOG(("<%s>", phase_string(newphase)));
s->SCp.sent_command = s->SCp.phase;
@@ -323,49 +323,49 @@ static inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs,
* Note that these are per-ESP queues, not global queues like
* the aha152x driver uses.
*/
-static inline void append_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC)
+static inline void append_SC(struct scsi_cmnd **SC, struct scsi_cmnd *new_SC)
{
- Scsi_Cmnd *end;
+ struct scsi_cmnd *end;
new_SC->host_scribble = (unsigned char *) NULL;
if(!*SC)
*SC = new_SC;
else {
- for(end=*SC;end->host_scribble;end=(Scsi_Cmnd *)end->host_scribble)
+ for (end = *SC; end->host_scribble; end = (struct scsi_cmnd *)end->host_scribble)
;
end->host_scribble = (unsigned char *) new_SC;
}
}
-static inline void prepend_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC)
+static inline void prepend_SC(struct scsi_cmnd **SC, struct scsi_cmnd *new_SC)
{
new_SC->host_scribble = (unsigned char *) *SC;
*SC = new_SC;
}
-static inline Scsi_Cmnd *remove_first_SC(Scsi_Cmnd **SC)
+static inline struct scsi_cmnd *remove_first_SC(struct scsi_cmnd **SC)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
ptr = *SC;
if(ptr)
- *SC = (Scsi_Cmnd *) (*SC)->host_scribble;
+ *SC = (struct scsi_cmnd *) (*SC)->host_scribble;
return ptr;
}
-static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, int target, int lun)
+static inline struct scsi_cmnd *remove_SC(struct scsi_cmnd **SC, int target, int lun)
{
- Scsi_Cmnd *ptr, *prev;
+ struct scsi_cmnd *ptr, *prev;
for(ptr = *SC, prev = NULL;
ptr && ((ptr->device->id != target) || (ptr->device->lun != lun));
- prev = ptr, ptr = (Scsi_Cmnd *) ptr->host_scribble)
+ prev = ptr, ptr = (struct scsi_cmnd *) ptr->host_scribble)
;
if(ptr) {
if(prev)
prev->host_scribble=ptr->host_scribble;
else
- *SC=(Scsi_Cmnd *)ptr->host_scribble;
+ *SC = (struct scsi_cmnd *)ptr->host_scribble;
}
return ptr;
}
@@ -908,7 +908,7 @@ int esp_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t off
}
EXPORT_SYMBOL(esp_proc_info);
-static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void esp_get_dmabufs(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
if(sp->use_sg == 0) {
sp->SCp.this_residual = sp->request_bufflen;
@@ -931,7 +931,7 @@ static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
}
}
-static void esp_release_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void esp_release_dmabufs(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
if(sp->use_sg == 0) {
if (esp->dma_mmu_release_scsi_one)
@@ -942,7 +942,7 @@ static void esp_release_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
}
}
-static void esp_restore_pointers(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void esp_restore_pointers(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
struct esp_pointers *ep = &esp->data_pointers[scmd_id(sp)];
@@ -952,7 +952,7 @@ static void esp_restore_pointers(struct NCR_ESP *esp, Scsi_Cmnd *sp)
sp->SCp.buffers_residual = ep->saved_buffers_residual;
}
-static void esp_save_pointers(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void esp_save_pointers(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
struct esp_pointers *ep = &esp->data_pointers[scmd_id(sp)];
@@ -982,7 +982,7 @@ static void esp_save_pointers(struct NCR_ESP *esp, Scsi_Cmnd *sp)
* case where we could see an interrupt is where we have disconnected
* commands active and they are trying to reselect us.
*/
-static inline void esp_check_cmd(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static inline void esp_check_cmd(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
switch(sp->cmd_len) {
case 6:
@@ -1013,7 +1013,7 @@ static void esp_exec_cmd(struct NCR_ESP *esp)
{
struct ESP_regs *eregs = esp->eregs;
struct esp_device *esp_dev;
- Scsi_Cmnd *SCptr;
+ struct scsi_cmnd *SCptr;
struct scsi_device *SDptr;
volatile unchar *cmdp = esp->esp_command;
unsigned char the_esp_command;
@@ -1239,7 +1239,7 @@ do_sync_known:
}
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
-int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+int esp_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
struct NCR_ESP *esp;
@@ -1280,7 +1280,7 @@ int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
}
/* Dump driver state. */
-static void esp_dump_cmd(Scsi_Cmnd *SCptr)
+static void esp_dump_cmd(struct scsi_cmnd *SCptr)
{
ESPLOG(("[tgt<%02x> lun<%02x> "
"pphase<%s> cphase<%s>]",
@@ -1292,7 +1292,7 @@ static void esp_dump_cmd(Scsi_Cmnd *SCptr)
static void esp_dump_state(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
#ifdef DEBUG_ESP_CMDS
int i;
#endif
@@ -1337,13 +1337,13 @@ static void esp_dump_state(struct NCR_ESP *esp,
ESPLOG(("esp%d: disconnected ", esp->esp_id));
while(SCptr) {
esp_dump_cmd(SCptr);
- SCptr = (Scsi_Cmnd *) SCptr->host_scribble;
+ SCptr = (struct scsi_cmnd *) SCptr->host_scribble;
}
ESPLOG(("\n"));
}
/* Abort a command. The host_lock is acquired by caller. */
-int esp_abort(Scsi_Cmnd *SCptr)
+int esp_abort(struct scsi_cmnd *SCptr)
{
struct NCR_ESP *esp = (struct NCR_ESP *) SCptr->device->host->hostdata;
struct ESP_regs *eregs = esp->eregs;
@@ -1375,13 +1375,13 @@ int esp_abort(Scsi_Cmnd *SCptr)
synchronize_irq(esp->irq);
}
if(esp->issue_SC) {
- Scsi_Cmnd **prev, *this;
+ struct scsi_cmnd **prev, *this;
for(prev = (&esp->issue_SC), this = esp->issue_SC;
this;
- prev = (Scsi_Cmnd **) &(this->host_scribble),
- this = (Scsi_Cmnd *) this->host_scribble) {
+ prev = (struct scsi_cmnd **) &(this->host_scribble),
+ this = (struct scsi_cmnd *) this->host_scribble) {
if(this == SCptr) {
- *prev = (Scsi_Cmnd *) this->host_scribble;
+ *prev = (struct scsi_cmnd *) this->host_scribble;
this->host_scribble = NULL;
esp_release_dmabufs(esp, this);
this->result = DID_ABORT << 16;
@@ -1424,7 +1424,7 @@ int esp_abort(Scsi_Cmnd *SCptr)
static int esp_finish_reset(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
- Scsi_Cmnd *sp = esp->current_SC;
+ struct scsi_cmnd *sp = esp->current_SC;
/* Clean up currently executing command, if any. */
if (sp != NULL) {
@@ -1471,7 +1471,7 @@ static int esp_do_resetbus(struct NCR_ESP *esp,
*
* The host_lock is acquired by caller.
*/
-int esp_reset(Scsi_Cmnd *SCptr)
+int esp_reset(struct scsi_cmnd *SCptr)
{
struct NCR_ESP *esp = (struct NCR_ESP *) SCptr->device->host->hostdata;
@@ -1487,7 +1487,7 @@ int esp_reset(Scsi_Cmnd *SCptr)
/* Internal ESP done function. */
static void esp_done(struct NCR_ESP *esp, int error)
{
- Scsi_Cmnd *done_SC;
+ struct scsi_cmnd *done_SC;
if(esp->current_SC) {
done_SC = esp->current_SC;
@@ -1528,7 +1528,7 @@ static int esp_do_cmdbegin(struct NCR_ESP *esp, struct ESP_regs *eregs);
* has gotten far enough yet. Hence the following.
*/
static inline int skipahead1(struct NCR_ESP *esp, struct ESP_regs *eregs,
- Scsi_Cmnd *scp, int prev_phase, int new_phase)
+ struct scsi_cmnd *scp, int prev_phase, int new_phase)
{
if(scp->SCp.sent_command != prev_phase)
return 0;
@@ -1549,7 +1549,7 @@ static inline int skipahead1(struct NCR_ESP *esp, struct ESP_regs *eregs,
static inline int skipahead2(struct NCR_ESP *esp,
struct ESP_regs *eregs,
- Scsi_Cmnd *scp, int prev_phase1, int prev_phase2,
+ struct scsi_cmnd *scp, int prev_phase1, int prev_phase2,
int new_phase)
{
if(scp->SCp.sent_command != prev_phase1 &&
@@ -1604,7 +1604,7 @@ static inline int skipahead2(struct NCR_ESP *esp,
* to the next phase.
*/
static inline int esp100_sync_hwbug(struct NCR_ESP *esp, struct ESP_regs *eregs,
- Scsi_Cmnd *sp, int fifocnt)
+ struct scsi_cmnd *sp, int fifocnt)
{
/* Do not touch this piece of code. */
if((!(esp->erev == esp100)) ||
@@ -1693,7 +1693,7 @@ static inline int reconnect_lun(struct NCR_ESP *esp, struct ESP_regs *eregs)
* is being continued due to reselection.
*/
static inline void esp_connect(struct NCR_ESP *esp, struct ESP_regs *eregs,
- Scsi_Cmnd *sp)
+ struct scsi_cmnd *sp)
{
struct scsi_device *dp = sp->device;
struct esp_device *esp_dev = dp->hostdata;
@@ -1717,7 +1717,7 @@ static inline void esp_connect(struct NCR_ESP *esp, struct ESP_regs *eregs,
/* This will place the current working command back into the issue queue
* if we are to receive a reselection amidst a selection attempt.
*/
-static inline void esp_reconnect(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static inline void esp_reconnect(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
if(!esp->disconnected_SC)
ESPLOG(("esp%d: Weird, being reselected but disconnected "
@@ -1740,7 +1740,7 @@ static int esp_do_msgin(struct NCR_ESP *esp, struct ESP_regs *eregs)
return do_work_bus;
}
-static inline void advance_sg(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static inline void advance_sg(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
++sp->SCp.buffer;
--sp->SCp.buffers_residual;
@@ -1772,7 +1772,7 @@ static inline void advance_sg(struct NCR_ESP *esp, Scsi_Cmnd *sp)
*/
static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
int thisphase, hmuch;
ESPDATA(("esp_do_data: "));
@@ -1985,7 +1985,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
static int esp_do_data_finale(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
int bogus_data = 0, bytes_sent = 0, fifocnt, ecount = 0;
@@ -2159,7 +2159,7 @@ static int esp_do_data_finale(struct NCR_ESP *esp,
* a tape, we don't want to go into a loop re-negotiating
* synchronous capabilities over and over.
*/
-static int esp_should_clear_sync(Scsi_Cmnd *sp)
+static int esp_should_clear_sync(struct scsi_cmnd *sp)
{
unchar cmd = sp->cmnd[0];
@@ -2187,7 +2187,7 @@ static int esp_should_clear_sync(Scsi_Cmnd *sp)
*/
static int esp_do_freebus(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
int rval;
rval = skipahead2(esp, eregs, SCptr, in_status, in_msgindone, in_freeing);
@@ -2258,7 +2258,7 @@ static int esp_do_freebus(struct NCR_ESP *esp, struct ESP_regs *eregs)
*/
static int esp_bad_reconnect(struct NCR_ESP *esp)
{
- Scsi_Cmnd *sp;
+ struct scsi_cmnd *sp;
ESPLOG(("esp%d: Eieeee, reconnecting unknown command!\n",
esp->esp_id));
@@ -2267,21 +2267,21 @@ static int esp_bad_reconnect(struct NCR_ESP *esp)
ESPLOG(("esp%d: issue_SC[", esp->esp_id));
while(sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
- sp = (Scsi_Cmnd *) sp->host_scribble;
+ sp = (struct scsi_cmnd *) sp->host_scribble;
}
ESPLOG(("]\n"));
sp = esp->current_SC;
ESPLOG(("esp%d: current_SC[", esp->esp_id));
while(sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
- sp = (Scsi_Cmnd *) sp->host_scribble;
+ sp = (struct scsi_cmnd *) sp->host_scribble;
}
ESPLOG(("]\n"));
sp = esp->disconnected_SC;
ESPLOG(("esp%d: disconnected_SC[", esp->esp_id));
while(sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
- sp = (Scsi_Cmnd *) sp->host_scribble;
+ sp = (struct scsi_cmnd *) sp->host_scribble;
}
ESPLOG(("]\n"));
return do_reset_bus;
@@ -2292,7 +2292,7 @@ static int esp_do_reconnect(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
int lun, target;
- Scsi_Cmnd *SCptr;
+ struct scsi_cmnd *SCptr;
/* Check for all bogus conditions first. */
target = reconnect_target(esp, eregs);
@@ -2334,7 +2334,7 @@ static int esp_do_reconnect(struct NCR_ESP *esp,
*/
static int esp_do_status(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
int intr, rval;
rval = skipahead1(esp, eregs, SCptr, in_the_dark, in_status);
@@ -2475,7 +2475,7 @@ static int esp_enter_status(struct NCR_ESP *esp,
static int esp_disconnect_amidst_phases(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
- Scsi_Cmnd *sp = esp->current_SC;
+ struct scsi_cmnd *sp = esp->current_SC;
struct esp_device *esp_dev = sp->device->hostdata;
/* This means real problems if we see this
@@ -2574,7 +2574,7 @@ static int esp_do_phase_determine(struct NCR_ESP *esp,
/* First interrupt after exec'ing a cmd comes here. */
static int esp_select_complete(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
int cmd_bytes_sent, fcnt;
@@ -2928,7 +2928,7 @@ static int check_singlebyte_msg(struct NCR_ESP *esp,
* this because so many initiators cannot cope with this occurring.
*/
static int target_with_ants_in_pants(struct NCR_ESP *esp,
- Scsi_Cmnd *SCptr,
+ struct scsi_cmnd *SCptr,
struct esp_device *esp_dev)
{
if(esp_dev->sync || SCptr->device->borken) {
@@ -2983,7 +2983,7 @@ static void sync_report(struct NCR_ESP *esp)
static int check_multibyte_msg(struct NCR_ESP *esp,
struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
unchar regval = 0;
int message_out = 0;
@@ -3121,7 +3121,7 @@ static int check_multibyte_msg(struct NCR_ESP *esp,
static int esp_do_msgindone(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
int message_out = 0, it = 0, rval;
rval = skipahead1(esp, eregs, SCptr, in_msgin, in_msgindone);
@@ -3196,7 +3196,7 @@ static int esp_do_msgindone(struct NCR_ESP *esp, struct ESP_regs *eregs)
static int esp_do_cmdbegin(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
unsigned char tmp;
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
esp_advance_phase(SCptr, in_cmdend);
esp_cmd(esp, eregs, ESP_CMD_FLUSH);
@@ -3368,7 +3368,7 @@ static espfunc_t bus_vector[] = {
/* This is the second tier in our dual-level SCSI state machine. */
static int esp_work_bus(struct NCR_ESP *esp, struct ESP_regs *eregs)
{
- Scsi_Cmnd *SCptr = esp->current_SC;
+ struct scsi_cmnd *SCptr = esp->current_SC;
unsigned int phase;
ESPBUS(("esp_work_bus: "));
@@ -3397,7 +3397,7 @@ static espfunc_t isvc_vector[] = {
void esp_handle(struct NCR_ESP *esp)
{
struct ESP_regs *eregs;
- Scsi_Cmnd *SCptr;
+ struct scsi_cmnd *SCptr;
int what_next = do_intr_end;
eregs = esp->eregs;
SCptr = esp->current_SC;
diff --git a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h
index d85cb73..5a38f7f 100644
--- a/drivers/scsi/NCR53C9x.h
+++ b/drivers/scsi/NCR53C9x.h
@@ -392,9 +392,9 @@ struct NCR_ESP {
int slot; /* Slot the adapter occupies */
/* Our command queues, only one cmd lives in the current_SC queue. */
- Scsi_Cmnd *issue_SC; /* Commands to be issued */
- Scsi_Cmnd *current_SC; /* Who is currently working the bus */
- Scsi_Cmnd *disconnected_SC; /* Commands disconnected from the bus */
+ struct scsi_cmnd *issue_SC; /* Commands to be issued */
+ struct scsi_cmnd *current_SC; /* Who is currently working the bus */
+ struct scsi_cmnd *disconnected_SC; /* Commands disconnected from the bus */
/* Message goo */
unchar cur_msgout[16];
@@ -418,7 +418,7 @@ struct NCR_ESP {
*/
/* Required functions */
int (*dma_bytes_sent)(struct NCR_ESP *, int);
- int (*dma_can_transfer)(struct NCR_ESP *, Scsi_Cmnd *);
+ int (*dma_can_transfer)(struct NCR_ESP *, struct scsi_cmnd *);
void (*dma_dump_state)(struct NCR_ESP *);
void (*dma_init_read)(struct NCR_ESP *, __u32, int);
void (*dma_init_write)(struct NCR_ESP *, __u32, int);
@@ -440,11 +440,11 @@ struct NCR_ESP {
void (*dma_reset)(struct NCR_ESP *);
/* Optional virtual DMA functions */
- void (*dma_mmu_get_scsi_one)(struct NCR_ESP *, Scsi_Cmnd *);
- void (*dma_mmu_get_scsi_sgl)(struct NCR_ESP *, Scsi_Cmnd *);
- void (*dma_mmu_release_scsi_one)(struct NCR_ESP *, Scsi_Cmnd *);
- void (*dma_mmu_release_scsi_sgl)(struct NCR_ESP *, Scsi_Cmnd *);
- void (*dma_advance_sg)(Scsi_Cmnd *);
+ void (*dma_mmu_get_scsi_one)(struct NCR_ESP *, struct scsi_cmnd *);
+ void (*dma_mmu_get_scsi_sgl)(struct NCR_ESP *, struct scsi_cmnd *);
+ void (*dma_mmu_release_scsi_one)(struct NCR_ESP *, struct scsi_cmnd *);
+ void (*dma_mmu_release_scsi_sgl)(struct NCR_ESP *, struct scsi_cmnd *);
+ void (*dma_advance_sg)(struct scsi_cmnd *);
};
/* Bitfield meanings for the above registers. */
@@ -658,9 +658,9 @@ extern void esp_release(void);
extern void esp_initialize(struct NCR_ESP *);
extern irqreturn_t esp_intr(int, void *);
extern const char *esp_info(struct Scsi_Host *);
-extern int esp_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-extern int esp_abort(Scsi_Cmnd *);
-extern int esp_reset(Scsi_Cmnd *);
+extern int esp_queue(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+extern int esp_abort(struct scsi_cmnd *);
+extern int esp_reset(struct scsi_cmnd *);
extern int esp_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset, int length,
int inout);
extern int esp_slave_alloc(struct scsi_device *);
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 27/33][SCSI] nsp32_debug: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (25 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 26/33][SCSI] NCR53C9x: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 28/33][SCSI] oktagon_esp: " Richard Knutsson
` (7 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/nsp32_debug.c b/drivers/scsi/nsp32_debug.c
index ef3c59c..96cce0b 100644
--- a/drivers/scsi/nsp32_debug.c
+++ b/drivers/scsi/nsp32_debug.c
@@ -137,7 +137,7 @@ static void print_commandk (unsigned char *command)
printk("\n");
}
-static void show_command(Scsi_Cmnd *SCpnt)
+static void show_command(struct scsi_cmnd *SCpnt)
{
print_commandk(SCpnt->cmnd);
}
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 28/33][SCSI] oktagon_esp: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (26 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 27/33][SCSI] nsp32_debug: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 29/33][SCSI] pas16: " Richard Knutsson
` (6 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors.
diff --git a/drivers/scsi/oktagon_esp.c b/drivers/scsi/oktagon_esp.c
index 8e5eadb..9bc4eea 100644
--- a/drivers/scsi/oktagon_esp.c
+++ b/drivers/scsi/oktagon_esp.c
@@ -49,7 +49,7 @@
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, __u32 vaddress, int length);
static void dma_init_write(struct NCR_ESP *esp, __u32 vaddress, int length);
@@ -64,11 +64,11 @@ static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write);
static void dma_irq_exit(struct NCR_ESP *esp);
static void dma_invalidate(struct NCR_ESP *esp);
-static void dma_mmu_get_scsi_one(struct NCR_ESP *,Scsi_Cmnd *);
-static void dma_mmu_get_scsi_sgl(struct NCR_ESP *,Scsi_Cmnd *);
-static void dma_mmu_release_scsi_one(struct NCR_ESP *,Scsi_Cmnd *);
-static void dma_mmu_release_scsi_sgl(struct NCR_ESP *,Scsi_Cmnd *);
-static void dma_advance_sg(Scsi_Cmnd *);
+static void dma_mmu_get_scsi_one(struct NCR_ESP *, struct scsi_cmnd *);
+static void dma_mmu_get_scsi_sgl(struct NCR_ESP *, struct scsi_cmnd *);
+static void dma_mmu_release_scsi_one(struct NCR_ESP *, struct scsi_cmnd *);
+static void dma_mmu_release_scsi_sgl(struct NCR_ESP *, struct scsi_cmnd *);
+static void dma_advance_sg(struct scsi_cmnd *);
static int oktagon_notify_reboot(struct notifier_block *this, unsigned long code, void *x);
#ifdef USE_BOTTOM_HALF
@@ -395,7 +395,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
unsigned long sz = sp->SCp.this_residual;
if(sz > DMA_MAXTRANSFER)
@@ -542,26 +542,26 @@ static void dma_invalidate(struct NCR_ESP *esp)
* mmu interface to pass the virtual address, not the physical.
*/
-void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+void dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
sp->SCp.ptr =
sp->request_buffer;
}
-void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
sp->SCp.ptr = sg_virt(sp->SCp.buffer);
}
-void dma_mmu_release_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+void dma_mmu_release_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
}
-void dma_mmu_release_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+void dma_mmu_release_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
}
-void dma_advance_sg(Scsi_Cmnd *sp)
+void dma_advance_sg(struct scsi_cmnd *sp)
{
sp->SCp.ptr = sg_virt(sp->SCp.buffer);
}
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 29/33][SCSI] pas16: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (27 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 28/33][SCSI] oktagon_esp: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 30/33][SCSI] sun3x_esp: " Richard Knutsson
` (5 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h
index 8dc5b1a..dc87366 100644
--- a/drivers/scsi/pas16.h
+++ b/drivers/scsi/pas16.h
@@ -114,12 +114,12 @@
#ifndef ASM
-static int pas16_abort(Scsi_Cmnd *);
+static int pas16_abort(struct scsi_cmnd *);
static int pas16_biosparam(struct scsi_device *, struct block_device *,
sector_t, int*);
static int pas16_detect(struct scsi_host_template *);
-static int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int pas16_bus_reset(Scsi_Cmnd *);
+static int pas16_queue_command(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int pas16_bus_reset(struct scsi_cmnd *);
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 30/33][SCSI] sun3x_esp: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (28 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 29/33][SCSI] pas16: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 31/33][SCSI] sym53c416: " Richard Knutsson
` (4 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-warnings.
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index 1bc4190..8a7d5a4 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -25,7 +25,7 @@
static void dma_barrier(struct NCR_ESP *esp);
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_drain(struct NCR_ESP *esp);
static void dma_invalidate(struct NCR_ESP *esp);
static void dma_dump_state(struct NCR_ESP *esp);
@@ -38,11 +38,11 @@ static void dma_poll(struct NCR_ESP *esp, unsigned char *vaddr);
static int dma_ports_p(struct NCR_ESP *esp);
static void dma_reset(struct NCR_ESP *esp);
static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write);
-static void dma_mmu_get_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp);
-static void dma_mmu_get_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp);
-static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp);
-static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp);
-static void dma_advance_sg (Scsi_Cmnd *sp);
+static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp);
+static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp);
+static void dma_mmu_release_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp);
+static void dma_mmu_release_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp);
+static void dma_advance_sg(struct scsi_cmnd *sp);
/* Detecting ESP chips on the machine. This is the simple and easy
* version.
@@ -174,7 +174,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
return rval - fifo_count;
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
return sp->SCp.this_residual;
}
@@ -319,14 +319,14 @@ static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write)
dregs->st_addr = addr;
}
-static void dma_mmu_get_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
sp->SCp.have_data_in = dvma_map((unsigned long)sp->SCp.buffer,
sp->SCp.this_residual);
sp->SCp.ptr = (char *)((unsigned long)sp->SCp.have_data_in);
}
-static void dma_mmu_get_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
int sz = sp->SCp.buffers_residual;
struct scatterlist *sg = sp->SCp.buffer;
@@ -339,12 +339,12 @@ static void dma_mmu_get_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dma_address);
}
-static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void dma_mmu_release_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
dvma_unmap((char *)sp->SCp.have_data_in);
}
-static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
+static void dma_mmu_release_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd *sp)
{
int sz = sp->use_sg - 1;
struct scatterlist *sg = (struct scatterlist *)sp->request_buffer;
@@ -355,7 +355,7 @@ static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
}
}
-static void dma_advance_sg (Scsi_Cmnd *sp)
+static void dma_advance_sg(struct scsi_cmnd *sp)
{
sp->SCp.ptr = (char *)((unsigned long)sp->SCp.buffer->dma_address);
}
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 31/33][SCSI] sym53c416: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (29 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 30/33][SCSI] sun3x_esp: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 32/33][SCSI] wd7000: " Richard Knutsson
` (3 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
index 90cee94..689408a 100644
--- a/drivers/scsi/sym53c416.c
+++ b/drivers/scsi/sym53c416.c
@@ -225,7 +225,7 @@ static host hosts[MAXHOSTS] = {
static int host_index = 0;
static char info[120];
-static Scsi_Cmnd *current_command = NULL;
+static struct scsi_cmnd *current_command = NULL;
static int fastpio = 1;
static int probeaddrs[] = {0x200, 0x220, 0x240, 0};
@@ -748,7 +748,7 @@ const char *sym53c416_info(struct Scsi_Host *SChost)
return info;
}
-int sym53c416_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+int sym53c416_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
int base;
unsigned long flags = 0;
@@ -775,7 +775,7 @@ int sym53c416_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
return 0;
}
-static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
+static int sym53c416_host_reset(struct scsi_cmnd *SCpnt)
{
int base;
int scsi_id = -1;
diff --git a/drivers/scsi/sym53c416.h b/drivers/scsi/sym53c416.h
index 77860d0..a6a89fd 100644
--- a/drivers/scsi/sym53c416.h
+++ b/drivers/scsi/sym53c416.h
@@ -25,8 +25,8 @@
static int sym53c416_detect(struct scsi_host_template *);
static const char *sym53c416_info(struct Scsi_Host *);
static int sym53c416_release(struct Scsi_Host *);
-static int sym53c416_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int sym53c416_host_reset(Scsi_Cmnd *);
+static int sym53c416_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int sym53c416_host_reset(struct scsi_cmnd *);
static int sym53c416_bios_param(struct scsi_device *, struct block_device *,
sector_t, int *);
static void sym53c416_setup(char *str, int *ints);
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 32/33][SCSI] wd7000: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (30 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 31/33][SCSI] sym53c416: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 33a/33] include/scsi/scsi_tcq.h: " Richard Knutsson
` (2 subsequent siblings)
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-error.
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c
index 03cd44f..185e1b5 100644
--- a/drivers/scsi/wd7000.c
+++ b/drivers/scsi/wd7000.c
@@ -1567,7 +1567,7 @@ static int wd7000_release(struct Scsi_Host *shost)
/*
* I have absolutely NO idea how to do an abort with the WD7000...
*/
-static int wd7000_abort(Scsi_Cmnd * SCpnt)
+static int wd7000_abort(struct scsi_cmnd *SCpnt)
{
Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 33a/33] include/scsi/scsi_tcq.h: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (31 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 32/33][SCSI] wd7000: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 33b/33] include/scsi/scsi_tcq.h: Correct the parameter-name Richard Knutsson
2008-01-06 19:51 ` [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' James Bottomley
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: trivial, kernel-janitors, linux-scsi, Richard Knutsson
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
index cf4c219..341ed5a 100644
--- a/include/scsi/scsi_tcq.h
+++ b/include/scsi/scsi_tcq.h
@@ -86,7 +86,7 @@ static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
/**
* scsi_populate_tag_msg - place a tag message in a buffer
- * @SCpnt: pointer to the Scsi_Cmnd for the tag
+ * @SCpnt: pointer to the scsi_cmnd for the tag
* @msg: pointer to the area to place the tag
*
* Notes:
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 33b/33] include/scsi/scsi_tcq.h: Correct the parameter-name
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (32 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 33a/33] include/scsi/scsi_tcq.h: " Richard Knutsson
@ 2008-01-06 3:05 ` Richard Knutsson
2008-01-06 19:51 ` [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' James Bottomley
34 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 3:05 UTC (permalink / raw)
To: James.Bottomley; +Cc: kernel-janitors, trivial, linux-scsi, Richard Knutsson
Change to the correct argument-name.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
index cf4c219..341ed5a 100644
--- a/include/scsi/scsi_tcq.h
+++ b/include/scsi/scsi_tcq.h
@@ -86,7 +86,7 @@ static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
/**
* scsi_populate_tag_msg - place a tag message in a buffer
- * @SCpnt: pointer to the scsi_cmnd for the tag
+ * @cmd: pointer to the scsi_cmnd for the tag
* @msg: pointer to the area to place the tag
*
* Notes:
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h'
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
` (33 preceding siblings ...)
2008-01-06 3:05 ` [PATCH 33b/33] include/scsi/scsi_tcq.h: Correct the parameter-name Richard Knutsson
@ 2008-01-06 19:51 ` James Bottomley
2008-01-06 21:18 ` Richard Knutsson
34 siblings, 1 reply; 37+ messages in thread
From: James Bottomley @ 2008-01-06 19:51 UTC (permalink / raw)
To: Richard Knutsson; +Cc: kernel-janitors, trivial, linux-scsi
On Sun, 2008-01-06 at 04:02 +0100, Richard Knutsson wrote:
> Hi all
>
> drivers/scsi/scsi_typedefs.h is about ready to be removed, only the
> 'struct scsi_cmnd' typedef Scsi_Cmnd is left.
> This set converts all the Scsi_Cmnd's, except in:
> Changelogs
> Documentation/scsi/scsi_mid_low_api.txt
>
> So if all these gets merged, in one form or the other, we can:
> un'include scsi_typedefs.h from drivers/scsi/scsi.h
> fix the text in Documentation/scsi/scsi_mid_low_api.txt
> (finally) remove the file in question
>
>
> Left the "over 80 characters wide"-warnings alone, until requested otherwise.
>
> Am not subscribed on linux-scsi@vger.kernel.org, so if replying, please Cc: me.
Actually, a lot of this is superfluous ... the drivers are already
removed in the scsi-misc-2.6 tree.
The ideal is to remove this line:
#include "scsi.h"
Because that file (and scsi_typedefs.h) should be expendable by the end
of all of this (their whole purpose was so we didn't have to convert all
the typedefs), and then check the thing still compiles---you probably
have to add in some of the standard #include <scsi/scsi_..> files.
Please also don't bother with downcasing Scsi_Cmnd capitalisation in
the comments, that's a quirk I'm happy to leave, since it's unambiguous
in the doc book.
James
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h'
2008-01-06 19:51 ` [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' James Bottomley
@ 2008-01-06 21:18 ` Richard Knutsson
0 siblings, 0 replies; 37+ messages in thread
From: Richard Knutsson @ 2008-01-06 21:18 UTC (permalink / raw)
To: James Bottomley; +Cc: kernel-janitors, trivial, linux-scsi
James Bottomley wrote:
> On Sun, 2008-01-06 at 04:02 +0100, Richard Knutsson wrote:
>
>> Hi all
>>
>> drivers/scsi/scsi_typedefs.h is about ready to be removed, only the
>> 'struct scsi_cmnd' typedef Scsi_Cmnd is left.
>> This set converts all the Scsi_Cmnd's, except in:
>> Changelogs
>> Documentation/scsi/scsi_mid_low_api.txt
>>
>> So if all these gets merged, in one form or the other, we can:
>> un'include scsi_typedefs.h from drivers/scsi/scsi.h
>> fix the text in Documentation/scsi/scsi_mid_low_api.txt
>> (finally) remove the file in question
>>
>>
>> Left the "over 80 characters wide"-warnings alone, until requested otherwise.
>>
>> Am not subscribed on linux-scsi@vger.kernel.org, so if replying, please Cc: me.
>>
>
> Actually, a lot of this is superfluous ... the drivers are already
> removed in the scsi-misc-2.6 tree.
>
When are they be expected to be removed in the mainstream?
> The ideal is to remove this line:
>
> #include "scsi.h"
>
> Because that file (and scsi_typedefs.h) should be expendable by the end
> of all of this (their whole purpose was so we didn't have to convert all
> the typedefs), and then check the thing still compiles---you probably
> have to add in some of the standard #include <scsi/scsi_..> files.
>
Sounds reasonable.
> Please also don't bother with downcasing Scsi_Cmnd capitalisation in
> the comments, that's a quirk I'm happy to leave, since it's unambiguous
> in the doc book.
>
Ok, not like it is a real bother & can't imagine this would be a
possible source for collision with other patches, but I don't mind
either way.
Thanks
Richard Knutsson
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2008-01-06 21:19 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
2008-01-06 3:02 ` [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd' Richard Knutsson
2008-01-06 3:03 ` [PATCH 2/33][SCSI] advansys: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 3/33][SCSI] aha152x: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 4/33][SCSI] aha1542: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 5/33][SCSI] aha1740: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 6/33][SCSI] atari_NCR5380: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 7/33][SCSI] atari_scsi: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 8/33][SCSI] blz1230: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 9/33][SCSI] blz2060: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 10/33][SCSI] cyberstorm: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 11/33][SCSI] cyberstormII: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 12/33][SCSI] dtc: " Richard Knutsson
2008-01-06 3:03 ` [PATCH 13/33][SCSI] fastlane: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 14/33][SCSI] fd_mcs: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 15/33][SCSI] gdth: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 16/33][SCSI] gdth_proc: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 17/33][SCSI] g_NCR5380: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 18/33][SCSI] ibmmca: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 19/33][SCSI] ibmvscsi: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 20/33][SCSI] in2000: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 21/33][SCSI] mac_esp: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 22/33][SCSI] mca_53c9x: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 23/33][SCSI] megaraid: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 24/33][SCSI] NCR5380: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 25/33][SCSI] NCR53c406a: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 26/33][SCSI] NCR53C9x: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 27/33][SCSI] nsp32_debug: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 28/33][SCSI] oktagon_esp: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 29/33][SCSI] pas16: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 30/33][SCSI] sun3x_esp: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 31/33][SCSI] sym53c416: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 32/33][SCSI] wd7000: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 33a/33] include/scsi/scsi_tcq.h: " Richard Knutsson
2008-01-06 3:05 ` [PATCH 33b/33] include/scsi/scsi_tcq.h: Correct the parameter-name Richard Knutsson
2008-01-06 19:51 ` [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' James Bottomley
2008-01-06 21:18 ` Richard Knutsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).