summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2025-03-31 18:23:54 -0400
committerLyude Paul <lyude@redhat.com>2025-04-02 17:19:54 -0400
commit4190aa3a76a6f840ace7d5e30719f85af0ed6302 (patch)
treec3de24571779a735b216a7a5ca0a6f9e4e7e6356 /include/drm
parentf09d9f921f2b7b78e73e9f192a9c08b534b8e5e5 (diff)
drm/edid: Use unsigned int in drm_add_modes_noedid()
A negative resolution doesn't really make any sense, so let's make these parameters unsigned. In C this doesn't make much of a difference, but Rust is stricter about signed/unsigned casts and additionally can check for arithmetic over/underflows if CONFIG_RUST_OVERFLOW_CHECKS is enabled. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250331222556.454334-2-lyude@redhat.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_edid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index eaac5e665892..b38409670868 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -437,7 +437,7 @@ bool drm_detect_monitor_audio(const struct edid *edid);
enum hdmi_quantization_range
drm_default_rgb_quant_range(const struct drm_display_mode *mode);
int drm_add_modes_noedid(struct drm_connector *connector,
- int hdisplay, int vdisplay);
+ unsigned int hdisplay, unsigned int vdisplay);
int drm_edid_header_is_valid(const void *edid);
bool drm_edid_is_valid(struct edid *edid);