Commit e1b28f13 authored by Paolo Cretaro's avatar Paolo Cretaro Committed by Mauro Carvalho Chehab

[media] atomisp: use NULL instead of 0 for pointers

Fix warning issued by sparse: Using plain integer as NULL pointer
Signed-off-by: default avatarPaolo Cretaro <melko@frugalware.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 74058c59
...@@ -706,7 +706,7 @@ static int ov5693_read_otp_reg_array(struct i2c_client *client, u16 size, ...@@ -706,7 +706,7 @@ static int ov5693_read_otp_reg_array(struct i2c_client *client, u16 size,
{ {
u16 index; u16 index;
int ret; int ret;
u16 *pVal = 0; u16 *pVal = NULL;
for (index = 0; index <= size; index++) { for (index = 0; index <= size; index++) {
pVal = (u16 *) (buf + index); pVal = (u16 *) (buf + index);
......
...@@ -239,7 +239,7 @@ static ia_css_queue_t *bufq_get_qhandle( ...@@ -239,7 +239,7 @@ static ia_css_queue_t *bufq_get_qhandle(
enum sh_css_queue_id id, enum sh_css_queue_id id,
int thread) int thread)
{ {
ia_css_queue_t *q = 0; ia_css_queue_t *q = NULL;
switch (type) { switch (type) {
case sh_css_host2sp_buffer_queue: case sh_css_host2sp_buffer_queue:
......
...@@ -57,7 +57,7 @@ enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id, ...@@ -57,7 +57,7 @@ enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
hrt_vaddress code_addr = mmgr_NULL; hrt_vaddress code_addr = mmgr_NULL;
struct ia_css_sp_init_dmem_cfg *init_dmem_cfg; struct ia_css_sp_init_dmem_cfg *init_dmem_cfg;
if ((sp_id >= N_SP_ID) || (spctrl_cfg == 0)) if ((sp_id >= N_SP_ID) || (spctrl_cfg == NULL))
return IA_CSS_ERR_INVALID_ARGUMENTS; return IA_CSS_ERR_INVALID_ARGUMENTS;
spctrl_cofig_info[sp_id].code_addr = mmgr_NULL; spctrl_cofig_info[sp_id].code_addr = mmgr_NULL;
......
...@@ -193,7 +193,7 @@ int hmm_init(void) ...@@ -193,7 +193,7 @@ int hmm_init(void)
* at the beginning, to avoid hmm_alloc return 0 in the * at the beginning, to avoid hmm_alloc return 0 in the
* further allocation. * further allocation.
*/ */
dummy_ptr = hmm_alloc(1, HMM_BO_PRIVATE, 0, 0, HMM_UNCACHED); dummy_ptr = hmm_alloc(1, HMM_BO_PRIVATE, 0, NULL, HMM_UNCACHED);
if (!ret) { if (!ret) {
ret = sysfs_create_group(&atomisp_dev->kobj, ret = sysfs_create_group(&atomisp_dev->kobj,
......
...@@ -55,7 +55,7 @@ static ia_css_ptr __hrt_isp_css_mm_alloc(size_t bytes, void *userptr, ...@@ -55,7 +55,7 @@ static ia_css_ptr __hrt_isp_css_mm_alloc(size_t bytes, void *userptr,
if (type == HRT_USR_PTR) { if (type == HRT_USR_PTR) {
if (userptr == NULL) if (userptr == NULL)
return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, return hmm_alloc(bytes, HMM_BO_PRIVATE, 0,
0, cached); NULL, cached);
else { else {
if (num_pages < ((__page_align(bytes)) >> PAGE_SHIFT)) if (num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
dev_err(atomisp_dev, dev_err(atomisp_dev,
...@@ -94,7 +94,7 @@ ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes, void *userptr, ...@@ -94,7 +94,7 @@ ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes, void *userptr,
ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes) ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes)
{ {
if (my_userptr == NULL) if (my_userptr == NULL)
return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, 0, return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, NULL,
HMM_CACHED); HMM_CACHED);
else { else {
if (my_num_pages < ((__page_align(bytes)) >> PAGE_SHIFT)) if (my_num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment