dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: fix lut value extraction function
Date: Mon, 18 Apr 2016 17:53:25 +0200	[thread overview]
Message-ID: <20160418155325.GF2510@phenom.ffwll.local> (raw)
In-Reply-To: <CACvgo51tZW2RFKw6BfVSJ9oCjCWkqhipcFOQ9-poCRJvUJwy9A@mail.gmail.com>

On Mon, Apr 18, 2016 at 03:40:11PM +0100, Emil Velikov wrote:
> On 18 April 2016 at 13:36, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Apr 18, 2016 at 12:09:51PM +0100, Lionel Landwerlin wrote:
> >> Ping?
> >>
> >> On 22/03/16 14:10, Lionel Landwerlin wrote:
> >> >When extracting the value at full precision (16 bits), no need to
> >> >round the value.
> >> >
> >> >This was spotted by Jani when running sparse. Unfortunately this fix
> >> >doesn't get rid of the warning.
> >
> > It sounded like no bug, and the patch itself fails to appease sparse. And
> > I didn't check what's upsetting sparse itself, so figured "nothing to do
> > here until a real fix shows up".
> >
> According to the C99 standard a left shift with negative value is
> undefined. And we're hitting this case at full precision ;-)

Well commit message says sparse is still unhappy. So I'm not sure whether
the fix is good enough? And the issue with compiler/static checker noise
is that we really should aim to shut them up completely, because broken
windows and all that (even if it's sometimes a fallacy, I think it applies
here).
-Daniel

> 
> > Should I do something here?
> Having the above information in, optionally with the warning message
> in place of the current commit message would be recommended imho.
> 
> After all the patch is a definite fix, even if I personally I'd write
> the inline helper via a switch (makes things dead obvious).
> 
> Regardless,
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> 
> -Emil

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-04-18 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 14:10 [PATCH] drm: fix lut value extraction function Lionel Landwerlin
2016-04-18 11:09 ` Lionel Landwerlin
2016-04-18 12:36   ` Daniel Vetter
2016-04-18 14:40     ` Emil Velikov
2016-04-18 15:53       ` Daniel Vetter [this message]
2016-04-18 19:39         ` Emil Velikov
2016-04-20 10:52           ` Daniel Vetter

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=20160418155325.GF2510@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --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