浏览代码

Staging: crystalhd: Fix different address spaces warning from sparse in crystalhd_misc.c

This patch fixes following sparse warning in crystalhd_misc.c
WARNING: incorrect type in argument

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal 11 年之前
父节点
当前提交
6df1a83ba7
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      drivers/staging/crystalhd/crystalhd_lnx.h
  2. 1 1
      drivers/staging/crystalhd/crystalhd_misc.c

+ 2 - 2
drivers/staging/crystalhd/crystalhd_lnx.h

@@ -58,11 +58,11 @@ struct crystalhd_adp {
 
 
 	unsigned long		pci_mem_start;
 	unsigned long		pci_mem_start;
 	uint32_t		pci_mem_len;
 	uint32_t		pci_mem_len;
-	void			*addr;
+	void __iomem		*addr;
 
 
 	unsigned long		pci_i2o_start;
 	unsigned long		pci_i2o_start;
 	uint32_t		pci_i2o_len;
 	uint32_t		pci_i2o_len;
-	void			*i2o_addr;
+	void __iomem		*i2o_addr;
 
 
 	unsigned int		drv_data;
 	unsigned int		drv_data;
 	unsigned int		dmabits;	/* 32 | 64 */
 	unsigned int		dmabits;	/* 32 | 64 */

+ 1 - 1
drivers/staging/crystalhd/crystalhd_misc.c

@@ -740,7 +740,7 @@ enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
 	dio->fb_size = ubuff_sz & 0x03;
 	dio->fb_size = ubuff_sz & 0x03;
 	if (dio->fb_size) {
 	if (dio->fb_size) {
 		res = copy_from_user(dio->fb_va,
 		res = copy_from_user(dio->fb_va,
-				     (void *)(uaddr + count - dio->fb_size),
+				     (void __user *)(uaddr + count - dio->fb_size),
 				     dio->fb_size);
 				     dio->fb_size);
 		if (res) {
 		if (res) {
 			BCMLOG_ERR("failed %d to copy %u fill bytes from %p\n",
 			BCMLOG_ERR("failed %d to copy %u fill bytes from %p\n",