diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-03-28 17:48:34 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:08 -0400 |
commit | 81e56ded878aeb8730f18c1d0a70d5face788be3 (patch) | |
tree | 18485d237927fb1d95179bc1e03d4ebe6ef7d389 /drivers/scsi/aic94xx/aic94xx_reg.c | |
parent | d70d4667e9eead06aa38be947274fda22dcf923b (diff) |
[SCSI] aic94xx: cleanups
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- remove the unused aic94xx_seq.c:asd_unpause_lseq()
- #if 0 other unused code
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_reg.c')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_reg.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_reg.c b/drivers/scsi/aic94xx/aic94xx_reg.c index f210dac3203d..56b17c22526e 100644 --- a/drivers/scsi/aic94xx/aic94xx_reg.c +++ b/drivers/scsi/aic94xx/aic94xx_reg.c | |||
@@ -32,8 +32,8 @@ | |||
32 | * Offset comes before value to remind that the operation of | 32 | * Offset comes before value to remind that the operation of |
33 | * this function is *offs = val. | 33 | * this function is *offs = val. |
34 | */ | 34 | */ |
35 | static inline void asd_write_byte(struct asd_ha_struct *asd_ha, | 35 | static void asd_write_byte(struct asd_ha_struct *asd_ha, |
36 | unsigned long offs, u8 val) | 36 | unsigned long offs, u8 val) |
37 | { | 37 | { |
38 | if (unlikely(asd_ha->iospace)) | 38 | if (unlikely(asd_ha->iospace)) |
39 | outb(val, | 39 | outb(val, |
@@ -43,8 +43,8 @@ static inline void asd_write_byte(struct asd_ha_struct *asd_ha, | |||
43 | wmb(); | 43 | wmb(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static inline void asd_write_word(struct asd_ha_struct *asd_ha, | 46 | static void asd_write_word(struct asd_ha_struct *asd_ha, |
47 | unsigned long offs, u16 val) | 47 | unsigned long offs, u16 val) |
48 | { | 48 | { |
49 | if (unlikely(asd_ha->iospace)) | 49 | if (unlikely(asd_ha->iospace)) |
50 | outw(val, | 50 | outw(val, |
@@ -54,8 +54,8 @@ static inline void asd_write_word(struct asd_ha_struct *asd_ha, | |||
54 | wmb(); | 54 | wmb(); |
55 | } | 55 | } |
56 | 56 | ||
57 | static inline void asd_write_dword(struct asd_ha_struct *asd_ha, | 57 | static void asd_write_dword(struct asd_ha_struct *asd_ha, |
58 | unsigned long offs, u32 val) | 58 | unsigned long offs, u32 val) |
59 | { | 59 | { |
60 | if (unlikely(asd_ha->iospace)) | 60 | if (unlikely(asd_ha->iospace)) |
61 | outl(val, | 61 | outl(val, |
@@ -67,8 +67,7 @@ static inline void asd_write_dword(struct asd_ha_struct *asd_ha, | |||
67 | 67 | ||
68 | /* Reading from device address space. | 68 | /* Reading from device address space. |
69 | */ | 69 | */ |
70 | static inline u8 asd_read_byte(struct asd_ha_struct *asd_ha, | 70 | static u8 asd_read_byte(struct asd_ha_struct *asd_ha, unsigned long offs) |
71 | unsigned long offs) | ||
72 | { | 71 | { |
73 | u8 val; | 72 | u8 val; |
74 | if (unlikely(asd_ha->iospace)) | 73 | if (unlikely(asd_ha->iospace)) |
@@ -80,8 +79,8 @@ static inline u8 asd_read_byte(struct asd_ha_struct *asd_ha, | |||
80 | return val; | 79 | return val; |
81 | } | 80 | } |
82 | 81 | ||
83 | static inline u16 asd_read_word(struct asd_ha_struct *asd_ha, | 82 | static u16 asd_read_word(struct asd_ha_struct *asd_ha, |
84 | unsigned long offs) | 83 | unsigned long offs) |
85 | { | 84 | { |
86 | u16 val; | 85 | u16 val; |
87 | if (unlikely(asd_ha->iospace)) | 86 | if (unlikely(asd_ha->iospace)) |
@@ -93,8 +92,8 @@ static inline u16 asd_read_word(struct asd_ha_struct *asd_ha, | |||
93 | return val; | 92 | return val; |
94 | } | 93 | } |
95 | 94 | ||
96 | static inline u32 asd_read_dword(struct asd_ha_struct *asd_ha, | 95 | static u32 asd_read_dword(struct asd_ha_struct *asd_ha, |
97 | unsigned long offs) | 96 | unsigned long offs) |
98 | { | 97 | { |
99 | u32 val; | 98 | u32 val; |
100 | if (unlikely(asd_ha->iospace)) | 99 | if (unlikely(asd_ha->iospace)) |
@@ -124,22 +123,22 @@ static inline u32 asd_mem_offs_swb(void) | |||
124 | /* We know that the register wanted is in the range | 123 | /* We know that the register wanted is in the range |
125 | * of the sliding window. | 124 | * of the sliding window. |
126 | */ | 125 | */ |
127 | #define ASD_READ_SW(ww, type, ord) \ | 126 | #define ASD_READ_SW(ww, type, ord) \ |
128 | static inline type asd_read_##ww##_##ord (struct asd_ha_struct *asd_ha,\ | 127 | static type asd_read_##ww##_##ord(struct asd_ha_struct *asd_ha, \ |
129 | u32 reg) \ | 128 | u32 reg) \ |
130 | { \ | 129 | { \ |
131 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ | 130 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ |
132 | u32 map_offs=(reg - io_handle-> ww##_base )+asd_mem_offs_##ww ();\ | 131 | u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\ |
133 | return asd_read_##ord (asd_ha, (unsigned long) map_offs); \ | 132 | return asd_read_##ord(asd_ha, (unsigned long)map_offs); \ |
134 | } | 133 | } |
135 | 134 | ||
136 | #define ASD_WRITE_SW(ww, type, ord) \ | 135 | #define ASD_WRITE_SW(ww, type, ord) \ |
137 | static inline void asd_write_##ww##_##ord (struct asd_ha_struct *asd_ha,\ | 136 | static void asd_write_##ww##_##ord(struct asd_ha_struct *asd_ha, \ |
138 | u32 reg, type val) \ | 137 | u32 reg, type val) \ |
139 | { \ | 138 | { \ |
140 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ | 139 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ |
141 | u32 map_offs=(reg - io_handle-> ww##_base )+asd_mem_offs_##ww ();\ | 140 | u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\ |
142 | asd_write_##ord (asd_ha, (unsigned long) map_offs, val); \ | 141 | asd_write_##ord(asd_ha, (unsigned long)map_offs, val); \ |
143 | } | 142 | } |
144 | 143 | ||
145 | ASD_READ_SW(swa, u8, byte); | 144 | ASD_READ_SW(swa, u8, byte); |
@@ -186,7 +185,7 @@ ASD_WRITE_SW(swc, u32, dword); | |||
186 | * @asd_ha: pointer to host adapter structure | 185 | * @asd_ha: pointer to host adapter structure |
187 | * @reg: register desired to be within range of the new window | 186 | * @reg: register desired to be within range of the new window |
188 | */ | 187 | */ |
189 | static inline void asd_move_swb(struct asd_ha_struct *asd_ha, u32 reg) | 188 | static void asd_move_swb(struct asd_ha_struct *asd_ha, u32 reg) |
190 | { | 189 | { |
191 | u32 base = reg & ~(MBAR0_SWB_SIZE-1); | 190 | u32 base = reg & ~(MBAR0_SWB_SIZE-1); |
192 | pci_write_config_dword(asd_ha->pcidev, PCI_CONF_MBAR0_SWB, base); | 191 | pci_write_config_dword(asd_ha->pcidev, PCI_CONF_MBAR0_SWB, base); |