Re: [PATCH 09/14] drm/msm: Fix sparse warnings

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

 



On Mon, 19 Sep 2016, Emil Velikov <emil.l.velikov@xxxxxxxxx> wrote:
> On 19 September 2016 at 14:33,  <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
>
>> --- a/drivers/gpu/drm/msm/msm_fb.c
>> +++ b/drivers/gpu/drm/msm/msm_fb.c
>> @@ -132,7 +132,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
>>  struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
>>                 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
>>  {
>> -       struct drm_gem_object *bos[4] = {0};
>> +       struct drm_gem_object *bos[4] = {};
> Fwiw I was reminded using empty initializers isn't standard C [1].

Well, meh, we're not doing -std=c11 -pedantic. Arguably {} is neater.

I guess the commit message lacks the sparse warning about using plain
integer 0 as NULL pointer.

BR,
Jani.



>
> Regards,
> Emil
>
> [1] http://stackoverflow.com/questions/17589533/is-an-empty-initializer-list-valid-c-code
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux