All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 09/14] drm/msm: Fix sparse warnings
Date: Mon, 19 Sep 2016 17:01:23 +0100	[thread overview]
Message-ID: <CACvgo517rQ74u5hmFmAsOm2FxmaPvZYap6G3-D2hf9j8M6EV3w@mail.gmail.com> (raw)
In-Reply-To: <87a8f3zyy3.fsf@intel.com>

On 19 September 2016 at 16:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Mon, 19 Sep 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> On 19 September 2016 at 14:33,  <ville.syrjala@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.
>
Ack. Just pointing it out for people, who weren't familiar. Fwiw this
is one of the bigger bikesheding topics I've seen, esp. since
different compiler (versions) produce warnings for each permutation
:-\

Sparse shouldn't produce warning since the spec explicitly states that
0 should be 'good enough' for anyone ;-)

Regards,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-19 16:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
2016-09-19 13:33 ` [PATCH 01/14] drm/atomic-helper: Fix " ville.syrjala
2016-09-19 13:33 ` [PATCH 02/14] drm/blend: " ville.syrjala
2016-09-20  6:52   ` Laurent Pinchart
2016-09-19 13:33 ` [PATCH 03/14] drm/fb-helper: " ville.syrjala
2016-09-19 14:46   ` Daniel Vetter
2016-09-19 13:33 ` [PATCH 04/14] drm/arm: " ville.syrjala
2016-09-20  8:06   ` Liviu Dudau
2016-09-20 12:44     ` Liviu Dudau
2016-09-19 13:33 ` [PATCH 05/14] drm/ast: " ville.syrjala
2016-09-19 13:33 ` [PATCH 06/14] drm/bochs: " ville.syrjala
2016-09-19 13:33 ` [PATCH 07/14] drm/cirrus: " ville.syrjala
2016-09-19 13:33 ` [PATCH 08/14] drm/mgag200: " ville.syrjala
2016-09-19 13:33 ` [PATCH 09/14] drm/msm: " ville.syrjala
2016-09-19 13:52   ` Emil Velikov
2016-09-19 15:33     ` Jani Nikula
2016-09-19 16:01       ` Emil Velikov [this message]
2016-09-19 13:33 ` [PATCH 10/14] drm/nouveau: " ville.syrjala
2016-09-19 13:33 ` [PATCH 11/14] drm/rockchip: " ville.syrjala
2016-09-19 13:33 ` [PATCH 12/14] drm/sti: " ville.syrjala
2016-09-19 14:52   ` Vincent ABRIOU
2016-09-19 13:33 ` [PATCH 13/14] drm/sun4i: " ville.syrjala
2016-09-19 19:54   ` Maxime Ripard
2016-09-19 13:33 ` [PATCH 14/14] drm/tilcdc: " ville.syrjala
2016-09-22 20:29   ` Jyri Sarha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACvgo517rQ74u5hmFmAsOm2FxmaPvZYap6G3-D2hf9j8M6EV3w@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.