From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm: Help unconfuse gcc, avoid accidental impossible unsigned comparisons
Date: Mon, 18 May 2020 15:53:28 +0100 [thread overview]
Message-ID: <158981360893.7442.2371163498721023137@build.alporthouse.com> (raw)
In-Reply-To: <20200518144744.GP206103@phenom.ffwll.local>
Quoting Daniel Vetter (2020-05-18 15:47:44)
> On Sat, May 16, 2020 at 10:23:28PM +0100, Chris Wilson wrote:
> > drivers/gpu/drm/drm_client_modeset.c: In function ‘drm_client_firmware_config’:
> > ./include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> > __builtin_constant_p((l) > (h)), (l) > (h), 0)))
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Took me a while to spot where this goes boom, kinda wonder whether we
> should have an
>
> if (WARN_ON(!connector_count))
> return -EINVAL;
Atm, drm_client_firmware_config() is called only if connector_count!=0.
But if count==0, we would hit goto retry indefinitely, seems like that
would be worth a WARN.
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-05-18 14:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-16 21:23 [PATCH 1/4] drm: Include internal header for managed function declarations Chris Wilson
2020-05-16 21:23 ` [PATCH 2/4] drm: Help unconfuse gcc, avoid accidental impossible unsigned comparisons Chris Wilson
2020-05-18 14:47 ` Daniel Vetter
2020-05-18 14:53 ` Chris Wilson [this message]
2020-05-18 16:23 ` Emil Velikov
2020-05-18 16:26 ` Chris Wilson
2020-05-16 21:23 ` [PATCH 3/4] drm: Describe dp_rev for drm_dp_set_phy_test_pattern Chris Wilson
2020-05-18 14:49 ` Daniel Vetter
2020-05-16 21:23 ` [PATCH 4/4] drm: Match drm_dp_send_clear_payload_id_table definition to declaration Chris Wilson
2020-05-18 15:01 ` Daniel Vetter
2020-05-18 14:42 ` [PATCH 1/4] drm: Include internal header for managed function declarations 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=158981360893.7442.2371163498721023137@build.alporthouse.com \
--to=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dri-devel@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;
as well as URLs for NNTP newsgroup(s).