media: davinci_vpfe: remove useless checks from ipipe
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 6 Apr 2018 10:02:53 +0000 (06:02 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 17 Apr 2018 09:21:36 +0000 (05:21 -0400)
commit3d37383b7e746c9c044954f830047c56ab8e7aa2
tree593050ae143964b38cd77241bb0cec83e6085e44
parent4907c73deefea512620f7ba8199c99e30f4f65fc
media: davinci_vpfe: remove useless checks from ipipe

The dm365_ipipe_hw.c and dm365_ipipe.c file check if several table
pointers, declared at davinci_vpfe_user.h, are filled before using
them.

The problem is that those pointers come from struct declarations
like:

struct vpfe_ipipe_yee {
...
short table[VPFE_IPIPE_MAX_SIZE_YEE_LUT];
};

So, they can't be NULL! Solve those warnings:

    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:433 ipipe_set_lutdpc_regs() warn: this array is probably non-NULL. 'dpc->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:763 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_r'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:766 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_b'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:769 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_g'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:791 ipipe_set_3d_lut_regs() warn: this array is probably non-NULL. 'lut_3d->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:903 ipipe_set_gbce_regs() warn: this array is probably non-NULL. 'gbce->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:946 ipipe_set_ee_regs() warn: this array is probably non-NULL. 'ee->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:59 ipipe_validate_lutdpc_params() warn: this array is probably non-NULL. 'lutdpc->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:697 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_r'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:705 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_g'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:712 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_b'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:745 ipipe_get_3d_lut_params() warn: this array is probably non-NULL. 'lut_param->table'
    drivers/staging/media/davinci_vpfe/dm365_ipipe.c:926 ipipe_get_gbce_params() warn: this array is probably non-NULL. 'gbce_param->table'

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/davinci_vpfe/dm365_ipipe.c
drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c