Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: remove Scsi_Cmnd typedef

This will make subsequent refactoring easier to handle.

Note: this patch is nowhere checkpatch clean.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Johannes Thumshirn and committed by
Martin K. Petersen
91ebc1fa aa154ea8

+114 -109
+1 -1
drivers/scsi/3w-xxxx.c
··· 1925 1925 if (test_bit(TW_IN_RESET, &tw_dev->flags)) 1926 1926 return SCSI_MLQUEUE_HOST_BUSY; 1927 1927 1928 - /* Save done function into Scsi_Cmnd struct */ 1928 + /* Save done function into struct scsi_cmnd */ 1929 1929 SCpnt->scsi_done = done; 1930 1930 1931 1931 /* Queue the command and get a request id */
+1 -1
drivers/scsi/advansys.c
··· 8466 8466 } 8467 8467 8468 8468 /* 8469 - * Execute a single 'Scsi_Cmnd'. 8469 + * Execute a single 'struct scsi_cmnd'. 8470 8470 */ 8471 8471 static int asc_execute_scsi_cmnd(struct scsi_cmnd *scp) 8472 8472 {
+38 -33
drivers/scsi/aha152x.c
··· 422 422 * 423 423 */ 424 424 struct aha152x_hostdata { 425 - Scsi_Cmnd *issue_SC; 425 + struct scsi_cmnd *issue_SC; 426 426 /* pending commands to issue */ 427 427 428 - Scsi_Cmnd *current_SC; 428 + struct scsi_cmnd *current_SC; 429 429 /* current command on the bus */ 430 430 431 - Scsi_Cmnd *disconnected_SC; 431 + struct scsi_cmnd *disconnected_SC; 432 432 /* commands that disconnected */ 433 433 434 - Scsi_Cmnd *done_SC; 434 + struct scsi_cmnd *done_SC; 435 435 /* command that was completed */ 436 436 437 437 spinlock_t lock; ··· 510 510 * 511 511 */ 512 512 struct aha152x_scdata { 513 - Scsi_Cmnd *next; /* next sc in queue */ 513 + struct scsi_cmnd *next; /* next sc in queue */ 514 514 struct completion *done;/* semaphore to block on */ 515 515 struct scsi_eh_save ses; 516 516 }; ··· 633 633 static void done(struct Scsi_Host *shpnt, int error); 634 634 635 635 /* diagnostics */ 636 - static void show_command(Scsi_Cmnd * ptr); 636 + static void show_command(struct scsi_cmnd * ptr); 637 637 static void show_queues(struct Scsi_Host *shpnt); 638 638 static void disp_enintr(struct Scsi_Host *shpnt); 639 639 ··· 642 642 * queue services: 643 643 * 644 644 */ 645 - static inline void append_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC) 645 + static inline void append_SC(struct scsi_cmnd **SC, struct scsi_cmnd *new_SC) 646 646 { 647 - Scsi_Cmnd *end; 647 + struct scsi_cmnd *end; 648 648 649 649 SCNEXT(new_SC) = NULL; 650 650 if (!*SC) ··· 656 656 } 657 657 } 658 658 659 - static inline Scsi_Cmnd *remove_first_SC(Scsi_Cmnd ** SC) 659 + static inline struct scsi_cmnd *remove_first_SC(struct scsi_cmnd ** SC) 660 660 { 661 - Scsi_Cmnd *ptr; 661 + struct scsi_cmnd *ptr; 662 662 663 663 ptr = *SC; 664 664 if (ptr) { ··· 668 668 return ptr; 669 669 } 670 670 671 - static inline Scsi_Cmnd *remove_lun_SC(Scsi_Cmnd ** SC, int target, int lun) 671 + static inline struct scsi_cmnd *remove_lun_SC(struct scsi_cmnd ** SC, 672 + int target, int lun) 672 673 { 673 - Scsi_Cmnd *ptr, *prev; 674 + struct scsi_cmnd *ptr, *prev; 674 675 675 676 for (ptr = *SC, prev = NULL; 676 677 ptr && ((ptr->device->id != target) || (ptr->device->lun != lun)); ··· 690 689 return ptr; 691 690 } 692 691 693 - static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp) 692 + static inline struct scsi_cmnd *remove_SC(struct scsi_cmnd **SC, 693 + struct scsi_cmnd *SCp) 694 694 { 695 - Scsi_Cmnd *ptr, *prev; 695 + struct scsi_cmnd *ptr, *prev; 696 696 697 697 for (ptr = *SC, prev = NULL; 698 698 ptr && SCp!=ptr; ··· 914 912 /* 915 913 * Queue a command and setup interrupts for a free bus. 916 914 */ 917 - static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete, 918 - int phase, void (*done)(Scsi_Cmnd *)) 915 + static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, 916 + struct completion *complete, 917 + int phase, void (*done)(struct scsi_cmnd *)) 919 918 { 920 919 struct Scsi_Host *shpnt = SCpnt->device->host; 921 920 unsigned long flags; ··· 990 987 * queue a command 991 988 * 992 989 */ 993 - static int aha152x_queue_lck(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) 990 + static int aha152x_queue_lck(struct scsi_cmnd *SCpnt, 991 + void (*done)(struct scsi_cmnd *)) 994 992 { 995 993 return aha152x_internal_queue(SCpnt, NULL, 0, done); 996 994 } ··· 1002 998 /* 1003 999 * 1004 1000 */ 1005 - static void reset_done(Scsi_Cmnd *SCpnt) 1001 + static void reset_done(struct scsi_cmnd *SCpnt) 1006 1002 { 1007 1003 if(SCSEM(SCpnt)) { 1008 1004 complete(SCSEM(SCpnt)); ··· 1015 1011 * Abort a command 1016 1012 * 1017 1013 */ 1018 - static int aha152x_abort(Scsi_Cmnd *SCpnt) 1014 + static int aha152x_abort(struct scsi_cmnd *SCpnt) 1019 1015 { 1020 1016 struct Scsi_Host *shpnt = SCpnt->device->host; 1021 - Scsi_Cmnd *ptr; 1017 + struct scsi_cmnd *ptr; 1022 1018 unsigned long flags; 1023 1019 1024 1020 DO_LOCK(flags); ··· 1056 1052 * Reset a device 1057 1053 * 1058 1054 */ 1059 - static int aha152x_device_reset(Scsi_Cmnd * SCpnt) 1055 + static int aha152x_device_reset(struct scsi_cmnd * SCpnt) 1060 1056 { 1061 1057 struct Scsi_Host *shpnt = SCpnt->device->host; 1062 1058 DECLARE_COMPLETION(done); ··· 1114 1110 return ret; 1115 1111 } 1116 1112 1117 - static void free_hard_reset_SCs(struct Scsi_Host *shpnt, Scsi_Cmnd **SCs) 1113 + static void free_hard_reset_SCs(struct Scsi_Host *shpnt, 1114 + struct scsi_cmnd **SCs) 1118 1115 { 1119 - Scsi_Cmnd *ptr; 1116 + struct scsi_cmnd *ptr; 1120 1117 1121 1118 ptr=*SCs; 1122 1119 while(ptr) { 1123 - Scsi_Cmnd *next; 1120 + struct scsi_cmnd *next; 1124 1121 1125 1122 if(SCDATA(ptr)) { 1126 1123 next = SCNEXT(ptr); ··· 1176 1171 * Reset the bus 1177 1172 * 1178 1173 */ 1179 - static int aha152x_bus_reset(Scsi_Cmnd *SCpnt) 1174 + static int aha152x_bus_reset(struct scsi_cmnd *SCpnt) 1180 1175 { 1181 1176 return aha152x_bus_reset_host(SCpnt->device->host); 1182 1177 } ··· 1441 1436 1442 1437 if(!(DONE_SC->SCp.phase & not_issued)) { 1443 1438 struct aha152x_scdata *sc; 1444 - Scsi_Cmnd *ptr = DONE_SC; 1439 + struct scsi_cmnd *ptr = DONE_SC; 1445 1440 DONE_SC=NULL; 1446 1441 1447 1442 sc = SCDATA(ptr); ··· 1456 1451 } 1457 1452 1458 1453 if(DONE_SC && DONE_SC->scsi_done) { 1459 - Scsi_Cmnd *ptr = DONE_SC; 1454 + struct scsi_cmnd *ptr = DONE_SC; 1460 1455 DONE_SC=NULL; 1461 1456 1462 1457 /* turn led off, when no commands are in the driver */ ··· 2252 2247 */ 2253 2248 static void rsti_run(struct Scsi_Host *shpnt) 2254 2249 { 2255 - Scsi_Cmnd *ptr; 2250 + struct scsi_cmnd *ptr; 2256 2251 2257 2252 shost_printk(KERN_NOTICE, shpnt, "scsi reset in\n"); 2258 2253 2259 2254 ptr=DISCONNECTED_SC; 2260 2255 while(ptr) { 2261 - Scsi_Cmnd *next = SCNEXT(ptr); 2256 + struct scsi_cmnd *next = SCNEXT(ptr); 2262 2257 2263 2258 if (!ptr->device->soft_reset) { 2264 2259 remove_SC(&DISCONNECTED_SC, ptr); ··· 2443 2438 /* 2444 2439 * Show the command data of a command 2445 2440 */ 2446 - static void show_command(Scsi_Cmnd *ptr) 2441 + static void show_command(struct scsi_cmnd *ptr) 2447 2442 { 2448 2443 scsi_print_command(ptr); 2449 2444 scmd_printk(KERN_DEBUG, ptr, ··· 2467 2462 */ 2468 2463 static void show_queues(struct Scsi_Host *shpnt) 2469 2464 { 2470 - Scsi_Cmnd *ptr; 2465 + struct scsi_cmnd *ptr; 2471 2466 unsigned long flags; 2472 2467 2473 2468 DO_LOCK(flags); ··· 2489 2484 disp_enintr(shpnt); 2490 2485 } 2491 2486 2492 - static void get_command(struct seq_file *m, Scsi_Cmnd * ptr) 2487 + static void get_command(struct seq_file *m, struct scsi_cmnd * ptr) 2493 2488 { 2494 2489 int i; 2495 2490 ··· 2818 2813 static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) 2819 2814 { 2820 2815 int i; 2821 - Scsi_Cmnd *ptr; 2816 + struct scsi_cmnd *ptr; 2822 2817 unsigned long flags; 2823 2818 2824 2819 seq_puts(m, AHA152X_REVID "\n");
+5 -4
drivers/scsi/aha1740.c
··· 207 207 static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) 208 208 { 209 209 struct Scsi_Host *host = (struct Scsi_Host *) dev_id; 210 - void (*my_done)(Scsi_Cmnd *); 210 + void (*my_done)(struct scsi_cmnd *); 211 211 int errstatus, adapstat; 212 212 int number_serviced; 213 213 struct ecb *ecbptr; 214 - Scsi_Cmnd *SCtmp; 214 + struct scsi_cmnd *SCtmp; 215 215 unsigned int base; 216 216 unsigned long flags; 217 217 int handled = 0; ··· 311 311 return IRQ_RETVAL(handled); 312 312 } 313 313 314 - static int aha1740_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) 314 + static int aha1740_queuecommand_lck(struct scsi_cmnd * SCpnt, 315 + void (*done)(struct scsi_cmnd *)) 315 316 { 316 317 unchar direction; 317 318 unchar *cmd = (unchar *) SCpnt->cmnd; ··· 521 520 return 0; 522 521 } 523 522 524 - static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy) 523 + static int aha1740_eh_abort_handler (struct scsi_cmnd *dummy) 525 524 { 526 525 /* 527 526 * From Alan Cox :
+2 -2
drivers/scsi/aha1740.h
··· 135 135 /* Hardware defined portion ends here, rest is driver defined */ 136 136 u8 sense[MAX_SENSE]; /* Sense area */ 137 137 u8 status[MAX_STATUS]; /* Status area */ 138 - Scsi_Cmnd *SCpnt; /* Link to the SCSI Command Block */ 139 - void (*done) (Scsi_Cmnd *); /* Completion Function */ 138 + struct scsi_cmnd *SCpnt; /* Link to the SCSI Command Block */ 139 + void (*done) (struct scsi_cmnd *); /* Completion Function */ 140 140 }; 141 141 142 142 #define AHA1740CMD_NOP 0x00 /* No OP */
+35 -32
drivers/scsi/gdth.c
··· 146 146 static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, 147 147 int gdth_from_wait, int* pIndex); 148 148 static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, 149 - Scsi_Cmnd *scp); 149 + struct scsi_cmnd *scp); 150 150 static int gdth_async_event(gdth_ha_str *ha); 151 151 static void gdth_log_event(gdth_evt_data *dvr, char *buffer); 152 152 153 - static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 priority); 153 + static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 priority); 154 154 static void gdth_next(gdth_ha_str *ha); 155 - static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 b); 156 - static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp); 155 + static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 b); 156 + static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp); 157 157 static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, u16 source, 158 158 u16 idx, gdth_evt_data *evt); 159 159 static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr); ··· 161 161 gdth_evt_str *estr); 162 162 static void gdth_clear_events(void); 163 163 164 - static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, 164 + static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp, 165 165 char *buffer, u16 count); 166 - static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp); 167 - static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u16 hdrive); 166 + static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp); 167 + static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, 168 + u16 hdrive); 168 169 169 170 static void gdth_enable_int(gdth_ha_str *ha); 170 171 static int gdth_test_busy(gdth_ha_str *ha); ··· 447 446 int timeout, u32 *info) 448 447 { 449 448 gdth_ha_str *ha = shost_priv(sdev->host); 450 - Scsi_Cmnd *scp; 449 + struct scsi_cmnd *scp; 451 450 struct gdth_cmndinfo cmndinfo; 452 451 DECLARE_COMPLETION_ONSTACK(wait); 453 452 int rval; ··· 1983 1982 1984 1983 /* command queueing/sending functions */ 1985 1984 1986 - static void gdth_putq(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 priority) 1985 + static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 priority) 1987 1986 { 1988 1987 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); 1989 - register Scsi_Cmnd *pscp; 1990 - register Scsi_Cmnd *nscp; 1988 + register struct scsi_cmnd *pscp; 1989 + register struct scsi_cmnd *nscp; 1991 1990 unsigned long flags; 1992 1991 1993 1992 TRACE(("gdth_putq() priority %d\n",priority)); ··· 2001 2000 scp->SCp.ptr = NULL; 2002 2001 } else { /* queue not empty */ 2003 2002 pscp = ha->req_first; 2004 - nscp = (Scsi_Cmnd *)pscp->SCp.ptr; 2003 + nscp = (struct scsi_cmnd *)pscp->SCp.ptr; 2005 2004 /* priority: 0-highest,..,0xff-lowest */ 2006 2005 while (nscp && gdth_cmnd_priv(nscp)->priority <= priority) { 2007 2006 pscp = nscp; 2008 - nscp = (Scsi_Cmnd *)pscp->SCp.ptr; 2007 + nscp = (struct scsi_cmnd *)pscp->SCp.ptr; 2009 2008 } 2010 2009 pscp->SCp.ptr = (char *)scp; 2011 2010 scp->SCp.ptr = (char *)nscp; ··· 2014 2013 2015 2014 #ifdef GDTH_STATISTICS 2016 2015 flags = 0; 2017 - for (nscp=ha->req_first; nscp; nscp=(Scsi_Cmnd*)nscp->SCp.ptr) 2016 + for (nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) 2018 2017 ++flags; 2019 2018 if (max_rq < flags) { 2020 2019 max_rq = flags; ··· 2025 2024 2026 2025 static void gdth_next(gdth_ha_str *ha) 2027 2026 { 2028 - register Scsi_Cmnd *pscp; 2029 - register Scsi_Cmnd *nscp; 2027 + register struct scsi_cmnd *pscp; 2028 + register struct scsi_cmnd *nscp; 2030 2029 u8 b, t, l, firsttime; 2031 2030 u8 this_cmd, next_cmd; 2032 2031 unsigned long flags = 0; ··· 2041 2040 next_cmd = gdth_polling ? FALSE:TRUE; 2042 2041 cmd_index = 0; 2043 2042 2044 - for (nscp = pscp = ha->req_first; nscp; nscp = (Scsi_Cmnd *)nscp->SCp.ptr) { 2043 + for (nscp = pscp = ha->req_first; nscp; nscp = (struct scsi_cmnd *)nscp->SCp.ptr) { 2045 2044 struct gdth_cmndinfo *nscp_cmndinfo = gdth_cmnd_priv(nscp); 2046 - if (nscp != pscp && nscp != (Scsi_Cmnd *)pscp->SCp.ptr) 2047 - pscp = (Scsi_Cmnd *)pscp->SCp.ptr; 2045 + if (nscp != pscp && nscp != (struct scsi_cmnd *)pscp->SCp.ptr) 2046 + pscp = (struct scsi_cmnd *)pscp->SCp.ptr; 2048 2047 if (!nscp_cmndinfo->internal_command) { 2049 2048 b = nscp->device->channel; 2050 2049 t = nscp->device->id; ··· 2251 2250 if (!this_cmd) 2252 2251 break; 2253 2252 if (nscp == ha->req_first) 2254 - ha->req_first = pscp = (Scsi_Cmnd *)nscp->SCp.ptr; 2253 + ha->req_first = pscp = (struct scsi_cmnd *)nscp->SCp.ptr; 2255 2254 else 2256 2255 pscp->SCp.ptr = nscp->SCp.ptr; 2257 2256 if (!next_cmd) ··· 2276 2275 * gdth_copy_internal_data() - copy to/from a buffer onto a scsi_cmnd's 2277 2276 * buffers, kmap_atomic() as needed. 2278 2277 */ 2279 - static void gdth_copy_internal_data(gdth_ha_str *ha, Scsi_Cmnd *scp, 2278 + static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp, 2280 2279 char *buffer, u16 count) 2281 2280 { 2282 2281 u16 cpcount,i, max_sg = scsi_sg_count(scp); ··· 2318 2317 } 2319 2318 } 2320 2319 2321 - static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp) 2320 + static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp) 2322 2321 { 2323 2322 u8 t; 2324 2323 gdth_inq_data inq; ··· 2420 2419 return 0; 2421 2420 } 2422 2421 2423 - static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u16 hdrive) 2422 + static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, 2423 + u16 hdrive) 2424 2424 { 2425 2425 register gdth_cmd_str *cmdp; 2426 2426 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); ··· 2596 2594 return cmd_index; 2597 2595 } 2598 2596 2599 - static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 b) 2597 + static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 b) 2600 2598 { 2601 2599 register gdth_cmd_str *cmdp; 2602 2600 u16 i; ··· 2769 2767 return cmd_index; 2770 2768 } 2771 2769 2772 - static int gdth_special_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp) 2770 + static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp) 2773 2771 { 2774 2772 register gdth_cmd_str *cmdp; 2775 2773 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); ··· 2960 2958 gdt6m_dpram_str __iomem *dp6m_ptr = NULL; 2961 2959 gdt6_dpram_str __iomem *dp6_ptr; 2962 2960 gdt2_dpram_str __iomem *dp2_ptr; 2963 - Scsi_Cmnd *scp; 2961 + struct scsi_cmnd *scp; 2964 2962 int rval, i; 2965 2963 u8 IStatus; 2966 2964 u16 Service; ··· 3219 3217 } 3220 3218 3221 3219 static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, 3222 - Scsi_Cmnd *scp) 3220 + struct scsi_cmnd *scp) 3223 3221 { 3224 3222 gdth_msg_str *msg; 3225 3223 gdth_cmd_str *cmdp; ··· 3710 3708 static void gdth_timeout(struct timer_list *unused) 3711 3709 { 3712 3710 u32 i; 3713 - Scsi_Cmnd *nscp; 3711 + struct scsi_cmnd *nscp; 3714 3712 gdth_ha_str *ha; 3715 3713 unsigned long flags; 3716 3714 ··· 3726 3724 if (ha->cmd_tab[i].cmnd != UNUSED_CMND) 3727 3725 ++act_stats; 3728 3726 3729 - for (act_rq=0,nscp=ha->req_first; nscp; nscp=(Scsi_Cmnd*)nscp->SCp.ptr) 3727 + for (act_rq=0, 3728 + nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) 3730 3729 ++act_rq; 3731 3730 3732 3731 TRACE2(("gdth_to(): ints %d, ios %d, act_stats %d, act_rq %d\n", ··· 3912 3909 } 3913 3910 3914 3911 3915 - static int gdth_eh_bus_reset(Scsi_Cmnd *scp) 3912 + static int gdth_eh_bus_reset(struct scsi_cmnd *scp) 3916 3913 { 3917 3914 gdth_ha_str *ha = shost_priv(scp->device->host); 3918 3915 int i; 3919 3916 unsigned long flags; 3920 - Scsi_Cmnd *cmnd; 3917 + struct scsi_cmnd *cmnd; 3921 3918 u8 b; 3922 3919 3923 3920 TRACE2(("gdth_eh_bus_reset()\n")); ··· 4468 4465 static int gdth_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) 4469 4466 { 4470 4467 gdth_ha_str *ha; 4471 - Scsi_Cmnd *scp; 4468 + struct scsi_cmnd *scp; 4472 4469 unsigned long flags; 4473 4470 char cmnd[MAX_COMMAND_SIZE]; 4474 4471 void __user *argp = (void __user *)arg;
+5 -5
drivers/scsi/gdth.h
··· 162 162 #define BIGSECS 63 /* mapping 255*63 */ 163 163 164 164 /* special command ptr. */ 165 - #define UNUSED_CMND ((Scsi_Cmnd *)-1) 166 - #define INTERNAL_CMND ((Scsi_Cmnd *)-2) 167 - #define SCREEN_CMND ((Scsi_Cmnd *)-3) 165 + #define UNUSED_CMND ((struct scsi_cmnd *)-1) 166 + #define INTERNAL_CMND ((struct scsi_cmnd *)-2) 167 + #define SCREEN_CMND ((struct scsi_cmnd *)-3) 168 168 #define SPECIAL_SCP(p) (p==UNUSED_CMND || p==INTERNAL_CMND || p==SCREEN_CMND) 169 169 170 170 /* controller services */ ··· 867 867 u16 service; /* service/firmware ver./.. */ 868 868 u32 info; 869 869 u32 info2; /* additional info */ 870 - Scsi_Cmnd *req_first; /* top of request queue */ 870 + struct scsi_cmnd *req_first; /* top of request queue */ 871 871 struct { 872 872 u8 present; /* Flag: host drive present? */ 873 873 u8 is_logdrv; /* Flag: log. drive (master)? */ ··· 896 896 u32 id_list[MAXID]; /* IDs of the phys. devices */ 897 897 } raw[MAXBUS]; /* SCSI channels */ 898 898 struct { 899 - Scsi_Cmnd *cmnd; /* pending request */ 899 + struct scsi_cmnd *cmnd; /* pending request */ 900 900 u16 service; /* service */ 901 901 } cmd_tab[GDTH_MAXCMDS]; /* table of pend. requests */ 902 902 struct gdth_cmndinfo { /* per-command private info */
+1 -1
drivers/scsi/gdth_proc.c
··· 626 626 { 627 627 unsigned long flags; 628 628 int i; 629 - Scsi_Cmnd *scp; 629 + struct scsi_cmnd *scp; 630 630 struct gdth_cmndinfo *cmndinfo; 631 631 u8 b, t; 632 632
+1 -1
drivers/scsi/ibmvscsi/ibmvfc.c
··· 1322 1322 1323 1323 /** 1324 1324 * ibmvfc_map_sg_data - Maps dma for a scatterlist and initializes decriptor fields 1325 - * @scmd: Scsi_Cmnd with the scatterlist 1325 + * @scmd: struct scsi_cmnd with the scatterlist 1326 1326 * @evt: ibmvfc event struct 1327 1327 * @vfc_cmd: vfc_cmd that contains the memory descriptor 1328 1328 * @dev: device for which to map dma memory
+1 -1
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 681 681 682 682 /** 683 683 * map_sg_data: - Maps dma for a scatterlist and initializes decriptor fields 684 - * @cmd: Scsi_Cmnd with the scatterlist 684 + * @cmd: struct scsi_cmnd with the scatterlist 685 685 * @srp_cmd: srp_cmd that contains the memory descriptor 686 686 * @dev: device for which to map dma memory 687 687 *
+1 -1
drivers/scsi/libiscsi_tcp.c
··· 695 695 struct scsi_data_buffer *sdb = scsi_in(task->sc); 696 696 697 697 /* 698 - * Setup copy of Data-In into the Scsi_Cmnd 698 + * Setup copy of Data-In into the struct scsi_cmnd 699 699 * Scatterlist case: 700 700 * We set up the iscsi_segment to point to the next 701 701 * scatterlist entry to copy to. As we go along,
+15 -14
drivers/scsi/megaraid.c
··· 371 371 * The command queuing entry point for the mid-layer. 372 372 */ 373 373 static int 374 - megaraid_queue_lck(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *)) 374 + megaraid_queue_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) 375 375 { 376 376 adapter_t *adapter; 377 377 scb_t *scb; ··· 425 425 * commands. 426 426 */ 427 427 static inline scb_t * 428 - mega_allocate_scb(adapter_t *adapter, Scsi_Cmnd *cmd) 428 + mega_allocate_scb(adapter_t *adapter, struct scsi_cmnd *cmd) 429 429 { 430 430 struct list_head *head = &adapter->free_list; 431 431 scb_t *scb; ··· 457 457 * and the channel number. 458 458 */ 459 459 static inline int 460 - mega_get_ldrv_num(adapter_t *adapter, Scsi_Cmnd *cmd, int channel) 460 + mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel) 461 461 { 462 462 int tgt; 463 463 int ldrv_num; ··· 520 520 * boot settings. 521 521 */ 522 522 static scb_t * 523 - mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) 523 + mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) 524 524 { 525 525 mega_ext_passthru *epthru; 526 526 mega_passthru *pthru; ··· 951 951 * prepare a command for the scsi physical devices. 952 952 */ 953 953 static mega_passthru * 954 - mega_prepare_passthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd, 955 - int channel, int target) 954 + mega_prepare_passthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd, 955 + int channel, int target) 956 956 { 957 957 mega_passthru *pthru; 958 958 ··· 1015 1015 * commands for devices which can take extended CDBs (>10 bytes) 1016 1016 */ 1017 1017 static mega_ext_passthru * 1018 - mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd, 1019 - int channel, int target) 1018 + mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, 1019 + struct scsi_cmnd *cmd, 1020 + int channel, int target) 1020 1021 { 1021 1022 mega_ext_passthru *epthru; 1022 1023 ··· 1418 1417 { 1419 1418 mega_ext_passthru *epthru = NULL; 1420 1419 struct scatterlist *sgl; 1421 - Scsi_Cmnd *cmd = NULL; 1420 + struct scsi_cmnd *cmd = NULL; 1422 1421 mega_passthru *pthru = NULL; 1423 1422 mbox_t *mbox = NULL; 1424 1423 u8 c; ··· 1653 1652 static void 1654 1653 mega_rundoneq (adapter_t *adapter) 1655 1654 { 1656 - Scsi_Cmnd *cmd; 1655 + struct scsi_cmnd *cmd; 1657 1656 struct list_head *pos; 1658 1657 1659 1658 list_for_each(pos, &adapter->completed_list) { 1660 1659 1661 1660 struct scsi_pointer* spos = (struct scsi_pointer *)pos; 1662 1661 1663 - cmd = list_entry(spos, Scsi_Cmnd, SCp); 1662 + cmd = list_entry(spos, struct scsi_cmnd, SCp); 1664 1663 cmd->scsi_done(cmd); 1665 1664 } 1666 1665 ··· 1723 1722 mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len) 1724 1723 { 1725 1724 struct scatterlist *sg; 1726 - Scsi_Cmnd *cmd; 1725 + struct scsi_cmnd *cmd; 1727 1726 int sgcnt; 1728 1727 int idx; 1729 1728 ··· 1870 1869 * aborted. All the commands issued to the F/W must complete. 1871 1870 */ 1872 1871 static int 1873 - megaraid_abort(Scsi_Cmnd *cmd) 1872 + megaraid_abort(struct scsi_cmnd *cmd) 1874 1873 { 1875 1874 adapter_t *adapter; 1876 1875 int rval; ··· 1934 1933 * issued to the controller, abort/reset it. Otherwise return failure 1935 1934 */ 1936 1935 static int 1937 - megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) 1936 + megaraid_abort_and_reset(adapter_t *adapter, struct scsi_cmnd *cmd, int aor) 1938 1937 { 1939 1938 struct list_head *pos, *next; 1940 1939 scb_t *scb;
+7 -7
drivers/scsi/megaraid.h
··· 191 191 u32 dma_type; 192 192 u32 dma_direction; 193 193 194 - Scsi_Cmnd *cmd; 194 + struct scsi_cmnd *cmd; 195 195 dma_addr_t dma_h_bulkdata; 196 196 dma_addr_t dma_h_sgdata; 197 197 ··· 942 942 static int mega_setup_mailbox(adapter_t *); 943 943 944 944 static int megaraid_queue (struct Scsi_Host *, struct scsi_cmnd *); 945 - static scb_t * mega_build_cmd(adapter_t *, Scsi_Cmnd *, int *); 945 + static scb_t * mega_build_cmd(adapter_t *, struct scsi_cmnd *, int *); 946 946 static void __mega_runpendq(adapter_t *); 947 947 static int issue_scb_block(adapter_t *, u_char *); 948 948 ··· 951 951 952 952 static void mega_free_scb(adapter_t *, scb_t *); 953 953 954 - static int megaraid_abort(Scsi_Cmnd *); 955 - static int megaraid_reset(Scsi_Cmnd *); 956 - static int megaraid_abort_and_reset(adapter_t *, Scsi_Cmnd *, int); 954 + static int megaraid_abort(struct scsi_cmnd *); 955 + static int megaraid_reset(struct scsi_cmnd *); 956 + static int megaraid_abort_and_reset(adapter_t *, struct scsi_cmnd *, int); 957 957 static int megaraid_biosparam(struct scsi_device *, struct block_device *, 958 958 sector_t, int []); 959 959 ··· 983 983 984 984 static int mega_support_ext_cdb(adapter_t *); 985 985 static mega_passthru* mega_prepare_passthru(adapter_t *, scb_t *, 986 - Scsi_Cmnd *, int, int); 986 + struct scsi_cmnd *, int, int); 987 987 static mega_ext_passthru* mega_prepare_extpassthru(adapter_t *, 988 - scb_t *, Scsi_Cmnd *, int, int); 988 + scb_t *, struct scsi_cmnd *, int, int); 989 989 static void mega_enum_raid_scsi(adapter_t *); 990 990 static void mega_get_boot_drv(adapter_t *); 991 991 static int mega_support_random_del(adapter_t *);
+1 -1
drivers/scsi/nsp32_debug.c
··· 137 137 printk("\n"); 138 138 } 139 139 140 - static void show_command(Scsi_Cmnd *SCpnt) 140 + static void show_command(struct scsi_cmnd *SCpnt) 141 141 { 142 142 print_commandk(SCpnt->cmnd); 143 143 }
-3
drivers/scsi/scsi.h
··· 43 43 struct scsi_target; 44 44 struct scatterlist; 45 45 46 - /* obsolete typedef junk. */ 47 - #include "scsi_typedefs.h" 48 - 49 46 #endif /* _SCSI_H */
-2
drivers/scsi/scsi_typedefs.h
··· 1 - 2 - typedef struct scsi_cmnd Scsi_Cmnd;