All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: dri-devel@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [PATCH 2/4] drm: Help unconfuse gcc, avoid accidental impossible unsigned comparisons
Date: Sat, 16 May 2020 22:23:28 +0100	[thread overview]
Message-ID: <20200516212330.13633-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200516212330.13633-1-chris@chris-wilson.co.uk>

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>
---
 drivers/gpu/drm/drm_client_modeset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 7443114bd713..6e9530df0737 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -563,7 +563,7 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
 				       struct drm_client_offset *offsets,
 				       bool *enabled, int width, int height)
 {
-	unsigned int count = min_t(unsigned int, connector_count, BITS_PER_LONG);
+	const int count = min_t(unsigned int, connector_count, BITS_PER_LONG);
 	unsigned long conn_configured, conn_seq, mask;
 	struct drm_device *dev = client->dev;
 	int i, j;
-- 
2.20.1

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

  reply	other threads:[~2020-05-16 21:23 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 ` Chris Wilson [this message]
2020-05-18 14:47   ` [PATCH 2/4] drm: Help unconfuse gcc, avoid accidental impossible unsigned comparisons Daniel Vetter
2020-05-18 14:53     ` Chris Wilson
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=20200516212330.13633-2-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --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 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.