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

staging: most: add __iomem for io_base and registers

This removes a few Sparse warnings.

Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hugo Camboulive and committed by
Greg Kroah-Hartman
092c78f2 e7f2b70f

+10 -9
+2 -2
drivers/staging/most/hdm-dim2/dim2_hal.c
··· 84 84 struct lld_global_vars_t { 85 85 bool dim_is_initialized; 86 86 bool mcm_is_initialized; 87 - struct dim2_regs *dim2; /* DIM2 core base address */ 87 + struct dim2_regs __iomem *dim2; /* DIM2 core base address */ 88 88 u32 dbr_map[DBR_MAP_SIZE]; 89 89 }; 90 90 ··· 650 650 /* -------------------------------------------------------------------------- */ 651 651 /* API */ 652 652 653 - u8 dim_startup(void *dim_base_address, u32 mlb_clock) 653 + u8 dim_startup(struct dim2_regs __iomem *dim_base_address, u32 mlb_clock) 654 654 { 655 655 g.dim_is_initialized = false; 656 656
+4 -3
drivers/staging/most/hdm-dim2/dim2_hal.h
··· 16 16 #define _DIM2_HAL_H 17 17 18 18 #include <linux/types.h> 19 + #include "dim2_reg.h" 19 20 20 21 #ifdef __cplusplus 21 22 extern "C" { ··· 66 65 u16 done_sw_buffers_number; /*< Done software buffers number. */ 67 66 }; 68 67 69 - u8 dim_startup(void *dim_base_address, u32 mlb_clock); 68 + u8 dim_startup(struct dim2_regs __iomem *dim_base_address, u32 mlb_clock); 70 69 71 70 void dim_shutdown(void); 72 71 ··· 104 103 105 104 bool dim_detach_buffers(struct dim_channel *ch, u16 buffers_number); 106 105 107 - u32 dimcb_io_read(u32 *ptr32); 106 + u32 dimcb_io_read(u32 __iomem *ptr32); 108 107 109 - void dimcb_io_write(u32 *ptr32, u32 value); 108 + void dimcb_io_write(u32 __iomem *ptr32, u32 value); 110 109 111 110 void dimcb_on_error(u8 error_id, const char *error_message); 112 111
+3 -3
drivers/staging/most/hdm-dim2/dim2_hdm.c
··· 99 99 struct most_channel_capability capabilities[DMA_CHANNELS]; 100 100 struct most_interface most_iface; 101 101 char name[16 + sizeof "dim2-"]; 102 - void *io_base; 102 + void __iomem *io_base; 103 103 unsigned int irq_ahb0; 104 104 int clk_speed; 105 105 struct task_struct *netinfo_task; ··· 138 138 * dimcb_io_read - callback from HAL to read an I/O register 139 139 * @ptr32: register address 140 140 */ 141 - u32 dimcb_io_read(u32 *ptr32) 141 + u32 dimcb_io_read(u32 __iomem *ptr32) 142 142 { 143 143 return readl(ptr32); 144 144 } ··· 148 148 * @ptr32: register address 149 149 * @value: value to write 150 150 */ 151 - void dimcb_io_write(u32 *ptr32, u32 value) 151 + void dimcb_io_write(u32 __iomem *ptr32, u32 value) 152 152 { 153 153 writel(value, ptr32); 154 154 }
+1 -1
drivers/staging/most/hdm-dim2/dim2_hdm.h
··· 18 18 19 19 /* platform dependent data for dim2 interface */ 20 20 struct dim2_platform_data { 21 - int (*init)(struct dim2_platform_data *pd, void *io_base, 21 + int (*init)(struct dim2_platform_data *pd, void __iomem *io_base, 22 22 int clk_speed); 23 23 void (*destroy)(struct dim2_platform_data *pd); 24 24 void *priv;