Re: [PATCH v2 1/3] media: staging: atomisp: fix for sparse "using plain integer as NULL pointer" warnings.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 27, 2017 at 12:44:48PM +0000, Jeremy Sowden wrote:
> The "address" member of struct ia_css_host_data is a pointer-to-char, so define default as NULL.
> 
> Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
> ---
>  .../css2400/runtime/isp_param/interface/ia_css_isp_param_types.h        | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
> index 8e651b80345a..6fee3f7fd184 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
> +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
> @@ -95,7 +95,7 @@ union ia_css_all_memory_offsets {
>  };
>  
>  #define IA_CSS_DEFAULT_ISP_MEM_PARAMS \
> -		{ { { { 0, 0 } } } }
> +		{ { { { NULL, 0 } } } }

This define is way ugly and instead of making superficial changes, you
should try to eliminate it.

People look at warnings as a bad thing but they are actually a valuable
resource which call attention to bad code.  By making this change you're
kind of wasting the warning.  The bad code is still there, it's just
swept under the rug but like a dead mouse carcass it's still stinking up
the living room.  We should leave the warning there until it irritates
someone enough to fix it properly.

regards,
dan carpenter




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux