Skip to contentSkip to conversation

scsi: replace __inline with inline

PATCH In review Harvey Harrison 2 participants 2 messages Mar 5, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 scsi: replace __inline with inline

---
 drivers/scsi/aic7xxx/aic79xx_core.c   |   14 +-
 drivers/scsi/aic7xxx/aic79xx_inline.h |  218 ++++++++++++++++----------------
 drivers/scsi/aic7xxx/aic79xx_osm.c    |    4 +-
 drivers/scsi/aic7xxx/aic79xx_osm.h    |  110 ++++++++--------
 drivers/scsi/aic7xxx/aic79xx_pci.c    |    2 +-
 drivers/scsi/aic7xxx/aic7xxx_inline.h |  126 ++++++++++----------
 drivers/scsi/aic7xxx/aic7xxx_osm.c    |    8 +-
 drivers/scsi/aic7xxx/aic7xxx_osm.h    |  100 ++++++++--------
 drivers/scsi/aic7xxx/aic7xxx_pci.c    |    2 +-
 drivers/scsi/aic7xxx/aiclib.h         |    4 +-
 drivers/scsi/sym53c8xx_2/sym_glue.h   |    6 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.c   |    2 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.h   |    6 +-
 drivers/scsi/sym53c8xx_2/sym_malloc.c |    2 +-
 drivers/scsi/sym53c8xx_2/sym_misc.h   |   18 ++--
 15 files changed, 311 insertions(+), 311 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +7 -7
index ade0fb8..ccdc469 100644
@@ -268,7 +268,7 @@ static int		ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
 
 /******************************** Private Inlines *****************************/
 
-static __inline void
+static inline void
 ahd_assert_atn(struct ahd_softc *ahd)
 {
 	ahd_outb(ahd, SCSISIGO, ATNO);
@@ -280,7 +280,7 @@ ahd_assert_atn(struct ahd_softc *ahd)
  * are currently in a packetized transfer.  We could
  * just as easily be sending or receiving a message.
  */
-static __inline int
+static inline int
 ahd_currently_packetized(struct ahd_softc *ahd)
 {
 	ahd_mode_state	 saved_modes;
@@ -303,7 +303,7 @@ ahd_currently_packetized(struct ahd_softc *ahd)
 	return (packetized);
 }
 
-static __inline int
+static inline int
 ahd_set_active_fifo(struct ahd_softc *ahd)
 {
 	u_int active_fifo;
@@ -320,7 +320,7 @@ ahd_set_active_fifo(struct ahd_softc *ahd)
 	}
 }
 
-static __inline void
+static inline void
 ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
 {
 	ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL);
@@ -330,7 +330,7 @@ ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
  * Determine whether the sequencer reported a residual
  * for this SCB/transaction.
  */
-static __inline void
+static inline void
 ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
 {
 	uint32_t sgptr;
@@ -340,7 +340,7 @@ ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
 		ahd_calc_residual(ahd, scb);
 }
 
-static __inline void
+static inline void
 ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
 {
 	uint32_t sgptr;
@@ -7209,7 +7209,7 @@ ahd_resume(struct ahd_softc *ahd)
  * scbid that should be restored once manipualtion
  * of the TCL entry is complete.
  */
-static __inline u_int
+static inline u_int
 ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl)
 {
 	/*
drivers/scsi/aic7xxx/aic79xx_inline.h +109 -109

593 lines not on this page · raw message

drivers/scsi/aic7xxx/aic79xx_osm.c +2 -2
index 72fccd9..2d00e03 100644
@@ -370,9 +370,9 @@ static int ahd_linux_unit;
 
 
 /****************************** Inlines ***************************************/
-static __inline void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*);
+static inline void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*);
 
-static __inline void
+static inline void
 ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb)
 {
 	struct scsi_cmnd *cmd;
drivers/scsi/aic7xxx/aic79xx_osm.h +55 -55

250 lines not on this page · raw message

drivers/scsi/aic7xxx/aic79xx_pci.c +1 -1
index c9f79fd..008e6cd 100644
@@ -51,7 +51,7 @@
 
 #include "aic79xx_pci.h"
 
-static __inline uint64_t
+static inline uint64_t
 ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 {
 	uint64_t id;
drivers/scsi/aic7xxx/aic7xxx_inline.h +63 -63

362 lines not on this page · raw message

drivers/scsi/aic7xxx/aic7xxx_osm.c +4 -4
index 282aff6..392f423 100644
@@ -389,13 +389,13 @@ static int ahc_linux_unit;
 
 
 /********************************* Inlines ************************************/
-static __inline void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*);
+static inline void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*);
 
-static __inline int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
+static inline int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
 		 		      struct ahc_dma_seg *sg,
 				      dma_addr_t addr, bus_size_t len);
 
-static __inline void
+static inline void
 ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb)
 {
 	struct scsi_cmnd *cmd;
@@ -406,7 +406,7 @@ ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb)
 	scsi_dma_unmap(cmd);
 }
 
-static __inline int
+static inline int
 ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
 		  struct ahc_dma_seg *sg, dma_addr_t addr, bus_size_t len)
 {
drivers/scsi/aic7xxx/aic7xxx_osm.h +50 -50

226 lines not on this page · raw message

drivers/scsi/aic7xxx/aic7xxx_pci.c +1 -1
index 56848f4..b1db026 100644
@@ -54,7 +54,7 @@
 
 #include "aic7xxx_pci.h"
 
-static __inline uint64_t
+static inline uint64_t
 ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 {
 	uint64_t id;
drivers/scsi/aic7xxx/aiclib.h +2 -2
index 3bfbf0f..f8fd198 100644
@@ -133,7 +133,7 @@ struct scsi_sense_data
 #define SCSI_STATUS_TASK_ABORTED	0x40
 
 /************************* Large Disk Handling ********************************/
-static __inline int
+static inline int
 aic_sector_div(sector_t capacity, int heads, int sectors)
 {
 	/* ugly, ugly sector_div calling convention.. */
@@ -141,7 +141,7 @@ aic_sector_div(sector_t capacity, int heads, int sectors)
 	return (int)capacity;
 }
 
-static __inline uint32_t
+static inline uint32_t
 scsi_4btoul(uint8_t *bytes)
 {
 	uint32_t rv;
drivers/scsi/sym53c8xx_2/sym_glue.h +3 -3
index 567fbe0..e40eb91 100644
@@ -234,7 +234,7 @@ static inline struct sym_hcb * sym_get_hcb(struct Scsi_Host *host)
 /*
  *  Set the status field of a CAM CCB.
  */
-static __inline void 
+static inline void 
 sym_set_cam_status(struct scsi_cmnd *cmd, int status)
 {
 	cmd->result &= ~(0xff  << 16);
@@ -244,7 +244,7 @@ sym_set_cam_status(struct scsi_cmnd *cmd, int status)
 /*
  *  Get the status field of a CAM CCB.
  */
-static __inline int 
+static inline int 
 sym_get_cam_status(struct scsi_cmnd *cmd)
 {
 	return host_byte(cmd->result);
@@ -253,7 +253,7 @@ sym_get_cam_status(struct scsi_cmnd *cmd)
 /*
  *  Build CAM result for a successful IO and for a failed IO.
  */
-static __inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid)
+static inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid)
 {
 	scsi_set_resid(cmd, resid);
 	cmd->result = (((DID_OK) << 16) + ((cp->ssss_status) & 0x7f));
drivers/scsi/sym53c8xx_2/sym_hipd.c +1 -1
index 35142b5..91edf94 100644
@@ -602,7 +602,7 @@ sym_getsync(struct sym_hcb *np, u_char dt, u_char sfac, u_char *divp, u_char *fa
 /*
  *  Set initial io register bits from burst code.
  */
-static __inline void sym_init_burst(struct sym_hcb *np, u_char bc)
+static inline void sym_init_burst(struct sym_hcb *np, u_char bc)
 {
 	np->rv_ctest4	&= ~0x80;
 	np->rv_dmode	&= ~(0x3 << 6);
drivers/scsi/sym53c8xx_2/sym_hipd.h +3 -3
index ad07880..06ff947 100644
@@ -1092,7 +1092,7 @@ do {									\
 #elif SYM_CONF_DMA_ADDRESSING_MODE == 2
 #define DMA_DAC_MASK	DMA_64BIT_MASK
 int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s);
-static __inline void 
+static inline void 
 sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len)
 {
 	u32 h = (badd>>32);
@@ -1197,7 +1197,7 @@ dma_addr_t __vtobus(m_pool_ident_t dev_dmat, void *m);
 
 #define sym_m_pool_match(mp_id1, mp_id2)	(mp_id1 == mp_id2)
 
-static __inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
+static inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
 {
 	void *vaddr = NULL;
 	dma_addr_t baddr = 0;
@@ -1211,7 +1211,7 @@ static __inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
 	return vaddr;
 }
 
-static __inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
+static inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
 {
 	dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr,
 			vbp->baddr);
drivers/scsi/sym53c8xx_2/sym_malloc.c +1 -1
index 92bf9b1..883cac1 100644
@@ -262,7 +262,7 @@ static void ___free_dma_mem_cluster(m_pool_p mp, void *m)
 #endif
 
 /* Fetch the memory pool for a given pool id (i.e. DMA constraints) */
-static __inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat)
+static inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat)
 {
 	m_pool_p mp;
 	for (mp = mp0.next;
drivers/scsi/sym53c8xx_2/sym_misc.h +9 -9
index 0433d5d..29a73b5 100644
@@ -52,17 +52,17 @@ typedef struct sym_quehead {
 	(ptr)->flink = (ptr); (ptr)->blink = (ptr); \
 } while (0)
 
-static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head)
+static inline struct sym_quehead *sym_que_first(struct sym_quehead *head)
 {
 	return (head->flink == head) ? 0 : head->flink;
 }
 
-static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head)
+static inline struct sym_quehead *sym_que_last(struct sym_quehead *head)
 {
 	return (head->blink == head) ? 0 : head->blink;
 }
 
-static __inline void __sym_que_add(struct sym_quehead * new,
+static inline void __sym_que_add(struct sym_quehead * new,
 	struct sym_quehead * blink,
 	struct sym_quehead * flink)
 {
@@ -72,19 +72,19 @@ static __inline void __sym_que_add(struct sym_quehead * new,
 	blink->flink	= new;
 }
 
-static __inline void __sym_que_del(struct sym_quehead * blink,
+static inline void __sym_que_del(struct sym_quehead * blink,
 	struct sym_quehead * flink)
 {
 	flink->blink = blink;
 	blink->flink = flink;
 }
 
-static __inline int sym_que_empty(struct sym_quehead *head)
+static inline int sym_que_empty(struct sym_quehead *head)
 {
 	return head->flink == head;
 }
 
-static __inline void sym_que_splice(struct sym_quehead *list,
+static inline void sym_que_splice(struct sym_quehead *list,
 	struct sym_quehead *head)
 {
 	struct sym_quehead *first = list->flink;
@@ -101,7 +101,7 @@ static __inline void sym_que_splice(struct sym_quehead *list,
 	}
 }
 
-static __inline void sym_que_move(struct sym_quehead *orig,
+static inline void sym_que_move(struct sym_quehead *orig,
 	struct sym_quehead *dest)
 {
 	struct sym_quehead *first, *last;
@@ -131,7 +131,7 @@ static __inline void sym_que_move(struct sym_quehead *orig,
 
 #define sym_insque_head(new, head)	__sym_que_add(new, head, (head)->flink)
 
-static __inline struct sym_quehead *sym_remque_head(struct sym_quehead *head)
+static inline struct sym_quehead *sym_remque_head(struct sym_quehead *head)
 {
 	struct sym_quehead *elem = head->flink;
 
@@ -144,7 +144,7 @@ static __inline struct sym_quehead *sym_remque_head(struct sym_quehead *head)
 
 #define sym_insque_tail(new, head)	__sym_que_add(new, (head)->blink, head)
 
-static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head)
+static inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head)
 {
 	struct sym_quehead *elem = head->blink;
 
Signature · 1 line
1.5.4.3.500.g83a2c
#1 lore raw

drivers/scsi/aic7xxx/aic79xx_core.c static int ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, · line 274

Quoted 13 lines · Harvey Harrison

...

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -268,7 +268,7 @@ static int		ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
 
 /******************************** Private Inlines *****************************/
 
-static __inline void
+static inline void
 ahd_assert_atn(struct ahd_softc *ahd)
 {
 	ahd_outb(ahd, SCSISIGO, ATNO);
...

inline's in .c files in the kernel are in 99,9% of all cases the wrong thing, so when you anyway touch this code you cold as well remove them.

cu
Adrian

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