This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the offending 0s with NULL.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
KernelVersion: linux-next-20101202
drivers/staging/sep/sep_driver.c | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index d734887..2216bed 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -459,12 +459,12 @@ static int sep_free_dma_table_data_handler(struct sep_device *sep)
}
/* Reset all the values */
- dma->in_page_array = 0;
- dma->out_page_array = 0;
+ dma->in_page_array = NULL;
+ dma->out_page_array = NULL;
dma->in_num_pages = 0;
dma->out_num_pages = 0;
- dma->in_map_array = 0;
- dma->out_map_array = 0;
+ dma->in_map_array = NULL;
+ dma->out_map_array = NULL;
dma->in_map_num_entries = 0;
dma->out_map_num_entries = 0;
}
@@ -1114,13 +1114,13 @@ static int sep_lock_kernel_pages(struct sep_device *sep,
if (in_out_flag == SEP_DRIVER_IN_FLAG) {
*lli_array_ptr = lli_array;
sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages = 1;
- sep->dma_res_arr[sep->nr_dcb_creat].in_page_array = 0;
+ sep->dma_res_arr[sep->nr_dcb_creat].in_page_array = NULL;
sep->dma_res_arr[sep->nr_dcb_creat].in_map_array = map_array;
sep->dma_res_arr[sep->nr_dcb_creat].in_map_num_entries = 1;
} else {
*lli_array_ptr = lli_array;
sep->dma_res_arr[sep->nr_dcb_creat].out_num_pages = 1;
- sep->dma_res_arr[sep->nr_dcb_creat].out_page_array = 0;
+ sep->dma_res_arr[sep->nr_dcb_creat].out_page_array = NULL;
sep->dma_res_arr[sep->nr_dcb_creat].out_map_array = map_array;
sep->dma_res_arr[sep->nr_dcb_creat].out_map_num_entries = 1;
}
@@ -1216,7 +1216,7 @@ static int sep_lock_user_pages(struct sep_device *sep,
result = get_user_pages(current, current->mm, app_virt_addr,
num_pages,
...