git: drm/i915: Fix -Wstringop-overflow and -Wstringop-override warnings
Aaron LI
aly at crater.dragonflybsd.org
Tue Oct 13 04:50:41 PDT 2026
commit c874e29ad61d038f3618a1d996c9f74dabddc75e
Author: Aaron LI <aly at aaronly.me>
Date: Tue Oct 13 16:12:52 2026 +0800
drm/i915: Fix -Wstringop-overflow and -Wstringop-override warnings
The fixes has been obtained from upstream Linux:
- https://github.com/gregkh/linux/commit/fec4d42724a1bf3dcba52307e55375fdb967b852
- https://github.com/gregkh/linux/commit/e7c6e405e171fb33990a12ecfd14e6500d9e5cf2
- https://github.com/gregkh/linux/commit/336feb502a715909a8136eb6a62a83d7268a353b
Fix warnings given by GCC 12.5, e.g.,
```
/usr/src/sys/dev/drm/i915/intel_dp.c: In function 'intel_dp_check_mst_status':
/usr/src/sys/dev/drm/i915/intel_dp.c:4299:30: warning: 'drm_dp_channel_eq_ok' reading 6 bytes from a region of size 4 [-Wstringop-overread]
4299 | !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/dev/drm/i915/intel_dp.c:4299:30: note: referencing argument 1 of type 'const u8[6]' {aka 'const unsigned char[6]'}
In file included from /usr/src/sys/dev/drm/i915/intel_dp.c:40:
/usr/src/sys/dev/drm/i915/../../../dev/drm/include/drm/drm_dp_helper.h:955:6: note: in a call to function 'drm_dp_channel_eq_ok'
955 | bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
| ^~~~~~~~~~~~~~~~~~~~
/usr/src/sys/dev/drm/i915/intel_pm.c: In function 'snb_wm_lp3_irq_quirk':
/usr/src/sys/dev/drm/i915/intel_pm.c:3041:9: warning: 'intel_print_wm_latency' reading 16 bytes from a region of size 10 [-Wstringop-overread]
3041 | intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/dev/drm/i915/intel_pm.c:3041:9: note: referencing argument 3 of type 'const uint16_t[8]' {aka 'const short unsigned int[8]'}
/usr/src/sys/dev/drm/i915/intel_pm.c: In function 'ilk_setup_wm_latency':
/usr/src/sys/dev/drm/i915/intel_pm.c:3048:9: warning: 'intel_read_wm_latency' accessing 16 bytes in a region of size 10 [-Wstringop-overflow=]
3048 | intel_read_wm_latency(dev_priv, dev_priv->wm.pri_latency);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/dev/drm/i915/intel_pm.c:3048:9: note: referencing argument 2 of type 'uint16_t[8]' {aka 'short unsigned int[8]'}
/usr/src/sys/dev/drm/i915/intel_pm.c:2807:13: note: in a call to function 'intel_read_wm_latency'
2807 | static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
| ^~~~~~~~~~~~~~~~~~~~~
```
Summary of changes:
sys/dev/drm/i915/intel_dp.c | 13 ++++++++++++-
sys/dev/drm/i915/intel_pm.c | 4 ++--
2 files changed, 14 insertions(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c874e29ad61d038f3618a1d996c9f74dabddc75e
--
DragonFly BSD source repository
More information about the Commits
mailing list