Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds
Date: Wed, 15 Feb 2012 14:57:00 +0100	[thread overview]
Message-ID: <20120215135700.GE4095@phenom.ffwll.local> (raw)
In-Reply-To: <1329313363-25571-1-git-send-email-ben@bwidawsk.net>

On Wed, Feb 15, 2012 at 02:42:42PM +0100, Ben Widawsky wrote:
> Introduced in commits c1cd90ed and d27b1e0e
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

This one smells like gcc being stupid - it's in a static function an gcc
sees all the callsites and we only pass in a const ring argument. I'll
drop that one.

The other one is a bit more fishy, but we do check args->size == 0 before
calling into these functions, so we will execute the loop at least once
and hence is guaranteed to be initialized. It's harder to check, so gcc
has a point here. But this code is scheduled to get completely rewritten
anyway, so I'll drop this one, too. I'll re-send the new code in a few
days or so.

Cheers, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

      parent reply	other threads:[~2012-02-15 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 13:42 [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds Ben Widawsky
2012-02-15 13:42 ` [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized Ben Widawsky
2012-02-15 13:51   ` Chris Wilson
2012-02-15 13:55     ` Ben Widawsky
2012-03-22 16:53   ` Daniel Vetter
2012-02-15 13:57 ` Daniel Vetter [this message]

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=20120215135700.GE4095@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox