aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2009-03-04 15:06:06 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 11:23:16 -0400
commit1beb6fa85ca9afaee109811a3f4a984232a32a4f (patch)
tree432ecd3c15c451e4f3027811f7ab6fed8bd99f5c /drivers/scsi/aic7xxx
parent5880f486ef733dae820724a71e3b91241c7921bd (diff)
[SCSI] replace __inline with inline
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_core.c12
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_inline.h32
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.h102
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_pci.c2
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_inline.h5
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.h104
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_pci.c2
-rw-r--r--drivers/scsi/aic7xxx/aiclib.h4
8 files changed, 129 insertions, 134 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index bdad54ec088c..63b521d615f2 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -1034,7 +1034,7 @@ ahd_intr(struct ahd_softc *ahd)
1034} 1034}
1035 1035
1036/******************************** Private Inlines *****************************/ 1036/******************************** Private Inlines *****************************/
1037static __inline void 1037static inline void
1038ahd_assert_atn(struct ahd_softc *ahd) 1038ahd_assert_atn(struct ahd_softc *ahd)
1039{ 1039{
1040 ahd_outb(ahd, SCSISIGO, ATNO); 1040 ahd_outb(ahd, SCSISIGO, ATNO);
@@ -1069,7 +1069,7 @@ ahd_currently_packetized(struct ahd_softc *ahd)
1069 return (packetized); 1069 return (packetized);
1070} 1070}
1071 1071
1072static __inline int 1072static inline int
1073ahd_set_active_fifo(struct ahd_softc *ahd) 1073ahd_set_active_fifo(struct ahd_softc *ahd)
1074{ 1074{
1075 u_int active_fifo; 1075 u_int active_fifo;
@@ -1086,7 +1086,7 @@ ahd_set_active_fifo(struct ahd_softc *ahd)
1086 } 1086 }
1087} 1087}
1088 1088
1089static __inline void 1089static inline void
1090ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl) 1090ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
1091{ 1091{
1092 ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL); 1092 ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL);
@@ -1096,7 +1096,7 @@ ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
1096 * Determine whether the sequencer reported a residual 1096 * Determine whether the sequencer reported a residual
1097 * for this SCB/transaction. 1097 * for this SCB/transaction.
1098 */ 1098 */
1099static __inline void 1099static inline void
1100ahd_update_residual(struct ahd_softc *ahd, struct scb *scb) 1100ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
1101{ 1101{
1102 uint32_t sgptr; 1102 uint32_t sgptr;
@@ -1106,7 +1106,7 @@ ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
1106 ahd_calc_residual(ahd, scb); 1106 ahd_calc_residual(ahd, scb);
1107} 1107}
1108 1108
1109static __inline void 1109static inline void
1110ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb) 1110ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
1111{ 1111{
1112 uint32_t sgptr; 1112 uint32_t sgptr;
@@ -7987,7 +7987,7 @@ ahd_resume(struct ahd_softc *ahd)
7987 * scbid that should be restored once manipualtion 7987 * scbid that should be restored once manipualtion
7988 * of the TCL entry is complete. 7988 * of the TCL entry is complete.
7989 */ 7989 */
7990static __inline u_int 7990static inline u_int
7991ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl) 7991ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl)
7992{ 7992{
7993 /* 7993 /*
diff --git a/drivers/scsi/aic7xxx/aic79xx_inline.h b/drivers/scsi/aic7xxx/aic79xx_inline.h
index 5f12cf9d99d0..09335a3c8691 100644
--- a/drivers/scsi/aic7xxx/aic79xx_inline.h
+++ b/drivers/scsi/aic7xxx/aic79xx_inline.h
@@ -46,21 +46,20 @@
46#define _AIC79XX_INLINE_H_ 46#define _AIC79XX_INLINE_H_
47 47
48/******************************** Debugging ***********************************/ 48/******************************** Debugging ***********************************/
49static __inline char *ahd_name(struct ahd_softc *ahd); 49static inline char *ahd_name(struct ahd_softc *ahd);
50 50
51static __inline char * 51static inline char *ahd_name(struct ahd_softc *ahd)
52ahd_name(struct ahd_softc *ahd)
53{ 52{
54 return (ahd->name); 53 return (ahd->name);
55} 54}
56 55
57/************************ Sequencer Execution Control *************************/ 56/************************ Sequencer Execution Control *************************/
58static __inline void ahd_known_modes(struct ahd_softc *ahd, 57static inline void ahd_known_modes(struct ahd_softc *ahd,
59 ahd_mode src, ahd_mode dst); 58 ahd_mode src, ahd_mode dst);
60static __inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd, 59static inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd,
61 ahd_mode src, 60 ahd_mode src,
62 ahd_mode dst); 61 ahd_mode dst);
63static __inline void ahd_extract_mode_state(struct ahd_softc *ahd, 62static inline void ahd_extract_mode_state(struct ahd_softc *ahd,
64 ahd_mode_state state, 63 ahd_mode_state state,
65 ahd_mode *src, ahd_mode *dst); 64 ahd_mode *src, ahd_mode *dst);
66 65
@@ -73,7 +72,7 @@ int ahd_is_paused(struct ahd_softc *ahd);
73void ahd_pause(struct ahd_softc *ahd); 72void ahd_pause(struct ahd_softc *ahd);
74void ahd_unpause(struct ahd_softc *ahd); 73void ahd_unpause(struct ahd_softc *ahd);
75 74
76static __inline void 75static inline void
77ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) 76ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
78{ 77{
79 ahd->src_mode = src; 78 ahd->src_mode = src;
@@ -82,13 +81,13 @@ ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
82 ahd->saved_dst_mode = dst; 81 ahd->saved_dst_mode = dst;
83} 82}
84 83
85static __inline ahd_mode_state 84static inline ahd_mode_state
86ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) 85ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
87{ 86{
88 return ((src << SRC_MODE_SHIFT) | (dst << DST_MODE_SHIFT)); 87 return ((src << SRC_MODE_SHIFT) | (dst << DST_MODE_SHIFT));
89} 88}
90 89
91static __inline void 90static inline void
92ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state, 91ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state,
93 ahd_mode *src, ahd_mode *dst) 92 ahd_mode *src, ahd_mode *dst)
94{ 93{
@@ -102,13 +101,12 @@ void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
102 bus_size_t len, int last); 101 bus_size_t len, int last);
103 102
104/************************** Memory mapping routines ***************************/ 103/************************** Memory mapping routines ***************************/
105static __inline size_t ahd_sg_size(struct ahd_softc *ahd); 104static inline size_t ahd_sg_size(struct ahd_softc *ahd);
106 105
107void ahd_sync_sglist(struct ahd_softc *ahd, 106void ahd_sync_sglist(struct ahd_softc *ahd,
108 struct scb *scb, int op); 107 struct scb *scb, int op);
109 108
110static __inline size_t 109static inline size_t ahd_sg_size(struct ahd_softc *ahd)
111ahd_sg_size(struct ahd_softc *ahd)
112{ 110{
113 if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) 111 if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0)
114 return (sizeof(struct ahd_dma64_seg)); 112 return (sizeof(struct ahd_dma64_seg));
@@ -141,11 +139,9 @@ struct scb *
141 ahd_lookup_scb(struct ahd_softc *ahd, u_int tag); 139 ahd_lookup_scb(struct ahd_softc *ahd, u_int tag);
142void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); 140void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
143 141
144static __inline uint8_t * 142static inline uint8_t *ahd_get_sense_buf(struct ahd_softc *ahd,
145 ahd_get_sense_buf(struct ahd_softc *ahd,
146 struct scb *scb); 143 struct scb *scb);
147static __inline uint32_t 144static inline uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd,
148 ahd_get_sense_bufaddr(struct ahd_softc *ahd,
149 struct scb *scb); 145 struct scb *scb);
150 146
151#if 0 /* unused */ 147#if 0 /* unused */
@@ -158,13 +154,13 @@ do { \
158 154
159#endif 155#endif
160 156
161static __inline uint8_t * 157static inline uint8_t *
162ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb) 158ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
163{ 159{
164 return (scb->sense_data); 160 return (scb->sense_data);
165} 161}
166 162
167static __inline uint32_t 163static inline uint32_t
168ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb) 164ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
169{ 165{
170 return (scb->sense_busaddr); 166 return (scb->sense_busaddr);
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
index 8d6612c19922..55c1fe07969f 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -395,19 +395,19 @@ struct info_str {
395}; 395};
396 396
397/******************************** Locking *************************************/ 397/******************************** Locking *************************************/
398static __inline void 398static inline void
399ahd_lockinit(struct ahd_softc *ahd) 399ahd_lockinit(struct ahd_softc *ahd)
400{ 400{
401 spin_lock_init(&ahd->platform_data->spin_lock); 401 spin_lock_init(&ahd->platform_data->spin_lock);
402} 402}
403 403
404static __inline void 404static inline void
405ahd_lock(struct ahd_softc *ahd, unsigned long *flags) 405ahd_lock(struct ahd_softc *ahd, unsigned long *flags)
406{ 406{
407 spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); 407 spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags);
408} 408}
409 409
410static __inline void 410static inline void
411ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) 411ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
412{ 412{
413 spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); 413 spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags);
@@ -490,29 +490,29 @@ void ahd_pci_write_config(ahd_dev_softc_t pci,
490 int reg, uint32_t value, 490 int reg, uint32_t value,
491 int width); 491 int width);
492 492
493static __inline int ahd_get_pci_function(ahd_dev_softc_t); 493static inline int ahd_get_pci_function(ahd_dev_softc_t);
494static __inline int 494static inline int
495ahd_get_pci_function(ahd_dev_softc_t pci) 495ahd_get_pci_function(ahd_dev_softc_t pci)
496{ 496{
497 return (PCI_FUNC(pci->devfn)); 497 return (PCI_FUNC(pci->devfn));
498} 498}
499 499
500static __inline int ahd_get_pci_slot(ahd_dev_softc_t); 500static inline int ahd_get_pci_slot(ahd_dev_softc_t);
501static __inline int 501static inline int
502ahd_get_pci_slot(ahd_dev_softc_t pci) 502ahd_get_pci_slot(ahd_dev_softc_t pci)
503{ 503{
504 return (PCI_SLOT(pci->devfn)); 504 return (PCI_SLOT(pci->devfn));
505} 505}
506 506
507static __inline int ahd_get_pci_bus(ahd_dev_softc_t); 507static inline int ahd_get_pci_bus(ahd_dev_softc_t);
508static __inline int 508static inline int
509ahd_get_pci_bus(ahd_dev_softc_t pci) 509ahd_get_pci_bus(ahd_dev_softc_t pci)
510{ 510{
511 return (pci->bus->number); 511 return (pci->bus->number);
512} 512}
513 513
514static __inline void ahd_flush_device_writes(struct ahd_softc *); 514static inline void ahd_flush_device_writes(struct ahd_softc *);
515static __inline void 515static inline void
516ahd_flush_device_writes(struct ahd_softc *ahd) 516ahd_flush_device_writes(struct ahd_softc *ahd)
517{ 517{
518 /* XXX Is this sufficient for all architectures??? */ 518 /* XXX Is this sufficient for all architectures??? */
@@ -524,81 +524,81 @@ int ahd_linux_proc_info(struct Scsi_Host *, char *, char **,
524 off_t, int, int); 524 off_t, int, int);
525 525
526/*********************** Transaction Access Wrappers **************************/ 526/*********************** Transaction Access Wrappers **************************/
527static __inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); 527static inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
528static __inline void ahd_set_transaction_status(struct scb *, uint32_t); 528static inline void ahd_set_transaction_status(struct scb *, uint32_t);
529static __inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); 529static inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
530static __inline void ahd_set_scsi_status(struct scb *, uint32_t); 530static inline void ahd_set_scsi_status(struct scb *, uint32_t);
531static __inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); 531static inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd);
532static __inline uint32_t ahd_get_transaction_status(struct scb *); 532static inline uint32_t ahd_get_transaction_status(struct scb *);
533static __inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); 533static inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd);
534static __inline uint32_t ahd_get_scsi_status(struct scb *); 534static inline uint32_t ahd_get_scsi_status(struct scb *);
535static __inline void ahd_set_transaction_tag(struct scb *, int, u_int); 535static inline void ahd_set_transaction_tag(struct scb *, int, u_int);
536static __inline u_long ahd_get_transfer_length(struct scb *); 536static inline u_long ahd_get_transfer_length(struct scb *);
537static __inline int ahd_get_transfer_dir(struct scb *); 537static inline int ahd_get_transfer_dir(struct scb *);
538static __inline void ahd_set_residual(struct scb *, u_long); 538static inline void ahd_set_residual(struct scb *, u_long);
539static __inline void ahd_set_sense_residual(struct scb *scb, u_long resid); 539static inline void ahd_set_sense_residual(struct scb *scb, u_long resid);
540static __inline u_long ahd_get_residual(struct scb *); 540static inline u_long ahd_get_residual(struct scb *);
541static __inline u_long ahd_get_sense_residual(struct scb *); 541static inline u_long ahd_get_sense_residual(struct scb *);
542static __inline int ahd_perform_autosense(struct scb *); 542static inline int ahd_perform_autosense(struct scb *);
543static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, 543static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *,
544 struct scb *); 544 struct scb *);
545static __inline void ahd_notify_xfer_settings_change(struct ahd_softc *, 545static inline void ahd_notify_xfer_settings_change(struct ahd_softc *,
546 struct ahd_devinfo *); 546 struct ahd_devinfo *);
547static __inline void ahd_platform_scb_free(struct ahd_softc *ahd, 547static inline void ahd_platform_scb_free(struct ahd_softc *ahd,
548 struct scb *scb); 548 struct scb *scb);
549static __inline void ahd_freeze_scb(struct scb *scb); 549static inline void ahd_freeze_scb(struct scb *scb);
550 550
551static __inline 551static inline
552void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) 552void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
553{ 553{
554 cmd->result &= ~(CAM_STATUS_MASK << 16); 554 cmd->result &= ~(CAM_STATUS_MASK << 16);
555 cmd->result |= status << 16; 555 cmd->result |= status << 16;
556} 556}
557 557
558static __inline 558static inline
559void ahd_set_transaction_status(struct scb *scb, uint32_t status) 559void ahd_set_transaction_status(struct scb *scb, uint32_t status)
560{ 560{
561 ahd_cmd_set_transaction_status(scb->io_ctx,status); 561 ahd_cmd_set_transaction_status(scb->io_ctx,status);
562} 562}
563 563
564static __inline 564static inline
565void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) 565void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
566{ 566{
567 cmd->result &= ~0xFFFF; 567 cmd->result &= ~0xFFFF;
568 cmd->result |= status; 568 cmd->result |= status;
569} 569}
570 570
571static __inline 571static inline
572void ahd_set_scsi_status(struct scb *scb, uint32_t status) 572void ahd_set_scsi_status(struct scb *scb, uint32_t status)
573{ 573{
574 ahd_cmd_set_scsi_status(scb->io_ctx, status); 574 ahd_cmd_set_scsi_status(scb->io_ctx, status);
575} 575}
576 576
577static __inline 577static inline
578uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) 578uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd)
579{ 579{
580 return ((cmd->result >> 16) & CAM_STATUS_MASK); 580 return ((cmd->result >> 16) & CAM_STATUS_MASK);
581} 581}
582 582
583static __inline 583static inline
584uint32_t ahd_get_transaction_status(struct scb *scb) 584uint32_t ahd_get_transaction_status(struct scb *scb)
585{ 585{
586 return (ahd_cmd_get_transaction_status(scb->io_ctx)); 586 return (ahd_cmd_get_transaction_status(scb->io_ctx));
587} 587}
588 588
589static __inline 589static inline
590uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) 590uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd)
591{ 591{
592 return (cmd->result & 0xFFFF); 592 return (cmd->result & 0xFFFF);
593} 593}
594 594
595static __inline 595static inline
596uint32_t ahd_get_scsi_status(struct scb *scb) 596uint32_t ahd_get_scsi_status(struct scb *scb)
597{ 597{
598 return (ahd_cmd_get_scsi_status(scb->io_ctx)); 598 return (ahd_cmd_get_scsi_status(scb->io_ctx));
599} 599}
600 600
601static __inline 601static inline
602void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) 602void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
603{ 603{
604 /* 604 /*
@@ -607,43 +607,43 @@ void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
607 */ 607 */
608} 608}
609 609
610static __inline 610static inline
611u_long ahd_get_transfer_length(struct scb *scb) 611u_long ahd_get_transfer_length(struct scb *scb)
612{ 612{
613 return (scb->platform_data->xfer_len); 613 return (scb->platform_data->xfer_len);
614} 614}
615 615
616static __inline 616static inline
617int ahd_get_transfer_dir(struct scb *scb) 617int ahd_get_transfer_dir(struct scb *scb)
618{ 618{
619 return (scb->io_ctx->sc_data_direction); 619 return (scb->io_ctx->sc_data_direction);
620} 620}
621 621
622static __inline 622static inline
623void ahd_set_residual(struct scb *scb, u_long resid) 623void ahd_set_residual(struct scb *scb, u_long resid)
624{ 624{
625 scsi_set_resid(scb->io_ctx, resid); 625 scsi_set_resid(scb->io_ctx, resid);
626} 626}
627 627
628static __inline 628static inline
629void ahd_set_sense_residual(struct scb *scb, u_long resid) 629void ahd_set_sense_residual(struct scb *scb, u_long resid)
630{ 630{
631 scb->platform_data->sense_resid = resid; 631 scb->platform_data->sense_resid = resid;
632} 632}
633 633
634static __inline 634static inline
635u_long ahd_get_residual(struct scb *scb) 635u_long ahd_get_residual(struct scb *scb)
636{ 636{
637 return scsi_get_resid(scb->io_ctx); 637 return scsi_get_resid(scb->io_ctx);
638} 638}
639 639
640static __inline 640static inline
641u_long ahd_get_sense_residual(struct scb *scb) 641u_long ahd_get_sense_residual(struct scb *scb)
642{ 642{
643 return (scb->platform_data->sense_resid); 643 return (scb->platform_data->sense_resid);
644} 644}
645 645
646static __inline 646static inline
647int ahd_perform_autosense(struct scb *scb) 647int ahd_perform_autosense(struct scb *scb)
648{ 648{
649 /* 649 /*
@@ -654,20 +654,20 @@ int ahd_perform_autosense(struct scb *scb)
654 return (1); 654 return (1);
655} 655}
656 656
657static __inline uint32_t 657static inline uint32_t
658ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) 658ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
659{ 659{
660 return (sizeof(struct scsi_sense_data)); 660 return (sizeof(struct scsi_sense_data));
661} 661}
662 662
663static __inline void 663static inline void
664ahd_notify_xfer_settings_change(struct ahd_softc *ahd, 664ahd_notify_xfer_settings_change(struct ahd_softc *ahd,
665 struct ahd_devinfo *devinfo) 665 struct ahd_devinfo *devinfo)
666{ 666{
667 /* Nothing to do here for linux */ 667 /* Nothing to do here for linux */
668} 668}
669 669
670static __inline void 670static inline void
671ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) 671ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
672{ 672{
673 ahd->flags &= ~AHD_RESOURCE_SHORTAGE; 673 ahd->flags &= ~AHD_RESOURCE_SHORTAGE;
@@ -678,7 +678,7 @@ void ahd_platform_free(struct ahd_softc *ahd);
678void ahd_platform_init(struct ahd_softc *ahd); 678void ahd_platform_init(struct ahd_softc *ahd);
679void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); 679void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
680 680
681static __inline void 681static inline void
682ahd_freeze_scb(struct scb *scb) 682ahd_freeze_scb(struct scb *scb)
683{ 683{
684 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { 684 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
index b8423c428a14..90a04a37b4f7 100644
--- a/drivers/scsi/aic7xxx/aic79xx_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_pci.c
@@ -51,7 +51,7 @@
51 51
52#include "aic79xx_pci.h" 52#include "aic79xx_pci.h"
53 53
54static __inline uint64_t 54static inline uint64_t
55ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) 55ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
56{ 56{
57 uint64_t id; 57 uint64_t id;
diff --git a/drivers/scsi/aic7xxx/aic7xxx_inline.h b/drivers/scsi/aic7xxx/aic7xxx_inline.h
index 09bf2f4d78d5..0b57b783ef41 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_inline.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_inline.h
@@ -55,10 +55,9 @@ void ahc_sync_sglist(struct ahc_softc *ahc,
55 struct scb *scb, int op); 55 struct scb *scb, int op);
56 56
57/******************************** Debugging ***********************************/ 57/******************************** Debugging ***********************************/
58static __inline char *ahc_name(struct ahc_softc *ahc); 58static inline char *ahc_name(struct ahc_softc *ahc);
59 59
60static __inline char * 60static inline char *ahc_name(struct ahc_softc *ahc)
61ahc_name(struct ahc_softc *ahc)
62{ 61{
63 return (ahc->name); 62 return (ahc->name);
64} 63}
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
index 3f7238db35e5..56f07e527b48 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -230,7 +230,7 @@ int ahc_dmamap_unload(struct ahc_softc *, bus_dma_tag_t, bus_dmamap_t);
230#include "aic7xxx.h" 230#include "aic7xxx.h"
231 231
232/***************************** Timer Facilities *******************************/ 232/***************************** Timer Facilities *******************************/
233static __inline void 233static inline void
234ahc_scb_timer_reset(struct scb *scb, u_int usec) 234ahc_scb_timer_reset(struct scb *scb, u_int usec)
235{ 235{
236} 236}
@@ -401,19 +401,19 @@ struct info_str {
401/******************************** Locking *************************************/ 401/******************************** Locking *************************************/
402/* Lock protecting internal data structures */ 402/* Lock protecting internal data structures */
403 403
404static __inline void 404static inline void
405ahc_lockinit(struct ahc_softc *ahc) 405ahc_lockinit(struct ahc_softc *ahc)
406{ 406{
407 spin_lock_init(&ahc->platform_data->spin_lock); 407 spin_lock_init(&ahc->platform_data->spin_lock);
408} 408}
409 409
410static __inline void 410static inline void
411ahc_lock(struct ahc_softc *ahc, unsigned long *flags) 411ahc_lock(struct ahc_softc *ahc, unsigned long *flags)
412{ 412{
413 spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags); 413 spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags);
414} 414}
415 415
416static __inline void 416static inline void
417ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) 417ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
418{ 418{
419 spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags); 419 spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags);
@@ -493,22 +493,22 @@ void ahc_pci_write_config(ahc_dev_softc_t pci,
493 int reg, uint32_t value, 493 int reg, uint32_t value,
494 int width); 494 int width);
495 495
496static __inline int ahc_get_pci_function(ahc_dev_softc_t); 496static inline int ahc_get_pci_function(ahc_dev_softc_t);
497static __inline int 497static inline int
498ahc_get_pci_function(ahc_dev_softc_t pci) 498ahc_get_pci_function(ahc_dev_softc_t pci)
499{ 499{
500 return (PCI_FUNC(pci->devfn)); 500 return (PCI_FUNC(pci->devfn));
501} 501}
502 502
503static __inline int ahc_get_pci_slot(ahc_dev_softc_t); 503static inline int ahc_get_pci_slot(ahc_dev_softc_t);
504static __inline int 504static inline int
505ahc_get_pci_slot(ahc_dev_softc_t pci) 505ahc_get_pci_slot(ahc_dev_softc_t pci)
506{ 506{
507 return (PCI_SLOT(pci->devfn)); 507 return (PCI_SLOT(pci->devfn));
508} 508}
509 509
510static __inline int ahc_get_pci_bus(ahc_dev_softc_t); 510static inline int ahc_get_pci_bus(ahc_dev_softc_t);
511static __inline int 511static inline int
512ahc_get_pci_bus(ahc_dev_softc_t pci) 512ahc_get_pci_bus(ahc_dev_softc_t pci)
513{ 513{
514 return (pci->bus->number); 514 return (pci->bus->number);
@@ -521,8 +521,8 @@ static inline void ahc_linux_pci_exit(void) {
521} 521}
522#endif 522#endif
523 523
524static __inline void ahc_flush_device_writes(struct ahc_softc *); 524static inline void ahc_flush_device_writes(struct ahc_softc *);
525static __inline void 525static inline void
526ahc_flush_device_writes(struct ahc_softc *ahc) 526ahc_flush_device_writes(struct ahc_softc *ahc)
527{ 527{
528 /* XXX Is this sufficient for all architectures??? */ 528 /* XXX Is this sufficient for all architectures??? */
@@ -535,81 +535,81 @@ int ahc_linux_proc_info(struct Scsi_Host *, char *, char **,
535 535
536/*************************** Domain Validation ********************************/ 536/*************************** Domain Validation ********************************/
537/*********************** Transaction Access Wrappers *************************/ 537/*********************** Transaction Access Wrappers *************************/
538static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); 538static inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
539static __inline void ahc_set_transaction_status(struct scb *, uint32_t); 539static inline void ahc_set_transaction_status(struct scb *, uint32_t);
540static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); 540static inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
541static __inline void ahc_set_scsi_status(struct scb *, uint32_t); 541static inline void ahc_set_scsi_status(struct scb *, uint32_t);
542static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd); 542static inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd);
543static __inline uint32_t ahc_get_transaction_status(struct scb *); 543static inline uint32_t ahc_get_transaction_status(struct scb *);
544static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd); 544static inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd);
545static __inline uint32_t ahc_get_scsi_status(struct scb *); 545static inline uint32_t ahc_get_scsi_status(struct scb *);
546static __inline void ahc_set_transaction_tag(struct scb *, int, u_int); 546static inline void ahc_set_transaction_tag(struct scb *, int, u_int);
547static __inline u_long ahc_get_transfer_length(struct scb *); 547static inline u_long ahc_get_transfer_length(struct scb *);
548static __inline int ahc_get_transfer_dir(struct scb *); 548static inline int ahc_get_transfer_dir(struct scb *);
549static __inline void ahc_set_residual(struct scb *, u_long); 549static inline void ahc_set_residual(struct scb *, u_long);
550static __inline void ahc_set_sense_residual(struct scb *scb, u_long resid); 550static inline void ahc_set_sense_residual(struct scb *scb, u_long resid);
551static __inline u_long ahc_get_residual(struct scb *); 551static inline u_long ahc_get_residual(struct scb *);
552static __inline u_long ahc_get_sense_residual(struct scb *); 552static inline u_long ahc_get_sense_residual(struct scb *);
553static __inline int ahc_perform_autosense(struct scb *); 553static inline int ahc_perform_autosense(struct scb *);
554static __inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *, 554static inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *,
555 struct scb *); 555 struct scb *);
556static __inline void ahc_notify_xfer_settings_change(struct ahc_softc *, 556static inline void ahc_notify_xfer_settings_change(struct ahc_softc *,
557 struct ahc_devinfo *); 557 struct ahc_devinfo *);
558static __inline void ahc_platform_scb_free(struct ahc_softc *ahc, 558static inline void ahc_platform_scb_free(struct ahc_softc *ahc,
559 struct scb *scb); 559 struct scb *scb);
560static __inline void ahc_freeze_scb(struct scb *scb); 560static inline void ahc_freeze_scb(struct scb *scb);
561 561
562static __inline 562static inline
563void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) 563void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
564{ 564{
565 cmd->result &= ~(CAM_STATUS_MASK << 16); 565 cmd->result &= ~(CAM_STATUS_MASK << 16);
566 cmd->result |= status << 16; 566 cmd->result |= status << 16;
567} 567}
568 568
569static __inline 569static inline
570void ahc_set_transaction_status(struct scb *scb, uint32_t status) 570void ahc_set_transaction_status(struct scb *scb, uint32_t status)
571{ 571{
572 ahc_cmd_set_transaction_status(scb->io_ctx,status); 572 ahc_cmd_set_transaction_status(scb->io_ctx,status);
573} 573}
574 574
575static __inline 575static inline
576void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) 576void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
577{ 577{
578 cmd->result &= ~0xFFFF; 578 cmd->result &= ~0xFFFF;
579 cmd->result |= status; 579 cmd->result |= status;
580} 580}
581 581
582static __inline 582static inline
583void ahc_set_scsi_status(struct scb *scb, uint32_t status) 583void ahc_set_scsi_status(struct scb *scb, uint32_t status)
584{ 584{
585 ahc_cmd_set_scsi_status(scb->io_ctx, status); 585 ahc_cmd_set_scsi_status(scb->io_ctx, status);
586} 586}
587 587
588static __inline 588static inline
589uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) 589uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd)
590{ 590{
591 return ((cmd->result >> 16) & CAM_STATUS_MASK); 591 return ((cmd->result >> 16) & CAM_STATUS_MASK);
592} 592}
593 593
594static __inline 594static inline
595uint32_t ahc_get_transaction_status(struct scb *scb) 595uint32_t ahc_get_transaction_status(struct scb *scb)
596{ 596{
597 return (ahc_cmd_get_transaction_status(scb->io_ctx)); 597 return (ahc_cmd_get_transaction_status(scb->io_ctx));
598} 598}
599 599
600static __inline 600static inline
601uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) 601uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd)
602{ 602{
603 return (cmd->result & 0xFFFF); 603 return (cmd->result & 0xFFFF);
604} 604}
605 605
606static __inline 606static inline
607uint32_t ahc_get_scsi_status(struct scb *scb) 607uint32_t ahc_get_scsi_status(struct scb *scb)
608{ 608{
609 return (ahc_cmd_get_scsi_status(scb->io_ctx)); 609 return (ahc_cmd_get_scsi_status(scb->io_ctx));
610} 610}
611 611
612static __inline 612static inline
613void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) 613void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type)
614{ 614{
615 /* 615 /*
@@ -618,43 +618,43 @@ void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type)
618 */ 618 */
619} 619}
620 620
621static __inline 621static inline
622u_long ahc_get_transfer_length(struct scb *scb) 622u_long ahc_get_transfer_length(struct scb *scb)
623{ 623{
624 return (scb->platform_data->xfer_len); 624 return (scb->platform_data->xfer_len);
625} 625}
626 626
627static __inline 627static inline
628int ahc_get_transfer_dir(struct scb *scb) 628int ahc_get_transfer_dir(struct scb *scb)
629{ 629{
630 return (scb->io_ctx->sc_data_direction); 630 return (scb->io_ctx->sc_data_direction);
631} 631}
632 632
633static __inline 633static inline
634void ahc_set_residual(struct scb *scb, u_long resid) 634void ahc_set_residual(struct scb *scb, u_long resid)
635{ 635{
636 scsi_set_resid(scb->io_ctx, resid); 636 scsi_set_resid(scb->io_ctx, resid);
637} 637}
638 638
639static __inline 639static inline
640void ahc_set_sense_residual(struct scb *scb, u_long resid) 640void ahc_set_sense_residual(struct scb *scb, u_long resid)
641{ 641{
642 scb->platform_data->sense_resid = resid; 642 scb->platform_data->sense_resid = resid;
643} 643}
644 644
645static __inline 645static inline
646u_long ahc_get_residual(struct scb *scb) 646u_long ahc_get_residual(struct scb *scb)
647{ 647{
648 return scsi_get_resid(scb->io_ctx); 648 return scsi_get_resid(scb->io_ctx);
649} 649}
650 650
651static __inline 651static inline
652u_long ahc_get_sense_residual(struct scb *scb) 652u_long ahc_get_sense_residual(struct scb *scb)
653{ 653{
654 return (scb->platform_data->sense_resid); 654 return (scb->platform_data->sense_resid);
655} 655}
656 656
657static __inline 657static inline
658int ahc_perform_autosense(struct scb *scb) 658int ahc_perform_autosense(struct scb *scb)
659{ 659{
660 /* 660 /*
@@ -665,20 +665,20 @@ int ahc_perform_autosense(struct scb *scb)
665 return (1); 665 return (1);
666} 666}
667 667
668static __inline uint32_t 668static inline uint32_t
669ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) 669ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb)
670{ 670{
671 return (sizeof(struct scsi_sense_data)); 671 return (sizeof(struct scsi_sense_data));
672} 672}
673 673
674static __inline void 674static inline void
675ahc_notify_xfer_settings_change(struct ahc_softc *ahc, 675ahc_notify_xfer_settings_change(struct ahc_softc *ahc,
676 struct ahc_devinfo *devinfo) 676 struct ahc_devinfo *devinfo)
677{ 677{
678 /* Nothing to do here for linux */ 678 /* Nothing to do here for linux */
679} 679}
680 680
681static __inline void 681static inline void
682ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) 682ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
683{ 683{
684} 684}
@@ -687,7 +687,7 @@ int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg);
687void ahc_platform_free(struct ahc_softc *ahc); 687void ahc_platform_free(struct ahc_softc *ahc);
688void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb); 688void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
689 689
690static __inline void 690static inline void
691ahc_freeze_scb(struct scb *scb) 691ahc_freeze_scb(struct scb *scb)
692{ 692{
693 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { 693 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
index 4347c8dc459f..27014b9de126 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c
@@ -54,7 +54,7 @@
54 54
55#include "aic7xxx_pci.h" 55#include "aic7xxx_pci.h"
56 56
57static __inline uint64_t 57static inline uint64_t
58ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) 58ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
59{ 59{
60 uint64_t id; 60 uint64_t id;
diff --git a/drivers/scsi/aic7xxx/aiclib.h b/drivers/scsi/aic7xxx/aiclib.h
index 3bfbf0fe1ec2..f8fd198aafbc 100644
--- a/drivers/scsi/aic7xxx/aiclib.h
+++ b/drivers/scsi/aic7xxx/aiclib.h
@@ -133,7 +133,7 @@ struct scsi_sense_data
133#define SCSI_STATUS_TASK_ABORTED 0x40 133#define SCSI_STATUS_TASK_ABORTED 0x40
134 134
135/************************* Large Disk Handling ********************************/ 135/************************* Large Disk Handling ********************************/
136static __inline int 136static inline int
137aic_sector_div(sector_t capacity, int heads, int sectors) 137aic_sector_div(sector_t capacity, int heads, int sectors)
138{ 138{
139 /* ugly, ugly sector_div calling convention.. */ 139 /* ugly, ugly sector_div calling convention.. */
@@ -141,7 +141,7 @@ aic_sector_div(sector_t capacity, int heads, int sectors)
141 return (int)capacity; 141 return (int)capacity;
142} 142}
143 143
144static __inline uint32_t 144static inline uint32_t
145scsi_4btoul(uint8_t *bytes) 145scsi_4btoul(uint8_t *bytes)
146{ 146{
147 uint32_t rv; 147 uint32_t rv;