diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-12 20:11:23 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 09:20:19 -0400 |
commit | 5383825ca9a78b188341a288e45274166d2e4aea (patch) | |
tree | f2ce1dbae0af409100b38a3b6a7b79d22a39c06c /drivers/net/ethernet/sfc/io.h | |
parent | abc71bb939e3a789cc33ed46029bdff498bdc3a5 (diff) |
sfc: const-qualify source pointers for MMIO write functions
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/io.h')
-rw-r--r-- | drivers/net/ethernet/sfc/io.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h index 96759aee1c6c..39f60983954e 100644 --- a/drivers/net/ethernet/sfc/io.h +++ b/drivers/net/ethernet/sfc/io.h | |||
@@ -83,7 +83,7 @@ static inline __le32 _efx_readd(struct efx_nic *efx, unsigned int reg) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /* Write a normal 128-bit CSR, locking as appropriate. */ | 85 | /* Write a normal 128-bit CSR, locking as appropriate. */ |
86 | static inline void efx_writeo(struct efx_nic *efx, efx_oword_t *value, | 86 | static inline void efx_writeo(struct efx_nic *efx, const efx_oword_t *value, |
87 | unsigned int reg) | 87 | unsigned int reg) |
88 | { | 88 | { |
89 | unsigned long flags __attribute__ ((unused)); | 89 | unsigned long flags __attribute__ ((unused)); |
@@ -108,7 +108,7 @@ static inline void efx_writeo(struct efx_nic *efx, efx_oword_t *value, | |||
108 | 108 | ||
109 | /* Write 64-bit SRAM through the supplied mapping, locking as appropriate. */ | 109 | /* Write 64-bit SRAM through the supplied mapping, locking as appropriate. */ |
110 | static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, | 110 | static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, |
111 | efx_qword_t *value, unsigned int index) | 111 | const efx_qword_t *value, unsigned int index) |
112 | { | 112 | { |
113 | unsigned int addr = index * sizeof(*value); | 113 | unsigned int addr = index * sizeof(*value); |
114 | unsigned long flags __attribute__ ((unused)); | 114 | unsigned long flags __attribute__ ((unused)); |
@@ -129,7 +129,7 @@ static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, | |||
129 | } | 129 | } |
130 | 130 | ||
131 | /* Write a 32-bit CSR or the last dword of a special 128-bit CSR */ | 131 | /* Write a 32-bit CSR or the last dword of a special 128-bit CSR */ |
132 | static inline void efx_writed(struct efx_nic *efx, efx_dword_t *value, | 132 | static inline void efx_writed(struct efx_nic *efx, const efx_dword_t *value, |
133 | unsigned int reg) | 133 | unsigned int reg) |
134 | { | 134 | { |
135 | netif_vdbg(efx, hw, efx->net_dev, | 135 | netif_vdbg(efx, hw, efx->net_dev, |
@@ -190,8 +190,9 @@ static inline void efx_readd(struct efx_nic *efx, efx_dword_t *value, | |||
190 | } | 190 | } |
191 | 191 | ||
192 | /* Write a 128-bit CSR forming part of a table */ | 192 | /* Write a 128-bit CSR forming part of a table */ |
193 | static inline void efx_writeo_table(struct efx_nic *efx, efx_oword_t *value, | 193 | static inline void |
194 | unsigned int reg, unsigned int index) | 194 | efx_writeo_table(struct efx_nic *efx, const efx_oword_t *value, |
195 | unsigned int reg, unsigned int index) | ||
195 | { | 196 | { |
196 | efx_writeo(efx, value, reg + index * sizeof(efx_oword_t)); | 197 | efx_writeo(efx, value, reg + index * sizeof(efx_oword_t)); |
197 | } | 198 | } |
@@ -239,8 +240,9 @@ static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value, | |||
239 | /* Write a page-mapped 32-bit CSR (EVQ_RPTR or the high bits of | 240 | /* Write a page-mapped 32-bit CSR (EVQ_RPTR or the high bits of |
240 | * RX_DESC_UPD or TX_DESC_UPD) | 241 | * RX_DESC_UPD or TX_DESC_UPD) |
241 | */ | 242 | */ |
242 | static inline void _efx_writed_page(struct efx_nic *efx, efx_dword_t *value, | 243 | static inline void |
243 | unsigned int reg, unsigned int page) | 244 | _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, |
245 | unsigned int reg, unsigned int page) | ||
244 | { | 246 | { |
245 | efx_writed(efx, value, EFX_PAGED_REG(page, reg)); | 247 | efx_writed(efx, value, EFX_PAGED_REG(page, reg)); |
246 | } | 248 | } |
@@ -256,7 +258,7 @@ static inline void _efx_writed_page(struct efx_nic *efx, efx_dword_t *value, | |||
256 | * collector register. | 258 | * collector register. |
257 | */ | 259 | */ |
258 | static inline void _efx_writed_page_locked(struct efx_nic *efx, | 260 | static inline void _efx_writed_page_locked(struct efx_nic *efx, |
259 | efx_dword_t *value, | 261 | const efx_dword_t *value, |
260 | unsigned int reg, | 262 | unsigned int reg, |
261 | unsigned int page) | 263 | unsigned int page) |
262 | { | 264 | { |