[PATCH 09/14] drm/msm: Fix sparse warnings
Jani Nikula
jani.nikula at linux.intel.com
Mon Sep 19 15:33:40 UTC 2016
On Mon, 19 Sep 2016, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 19 September 2016 at 14:33, <ville.syrjala at linux.intel.com> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jani Nikula, Intel Open Source Technology Center
More information about the dri-devel
mailing list