]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/dmc_wl: Use sentinel item for range tables
authorGustavo Sousa <gustavo.sousa@intel.com>
Fri, 8 Nov 2024 12:57:11 +0000 (09:57 -0300)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 8 Nov 2024 17:54:01 +0000 (09:54 -0800)
commit1e15bc5bd7665558f4296b4cc50a561460b9f236
treebc182e26cddf148dfb6f93ddd11f8076f982d996
parent7a522aa6cfcba6d0e73d87ce607c7436ff7aacb0
drm/i915/dmc_wl: Use sentinel item for range tables

We are currently using ARRAY_SIZE() to iterate address ranges in
intel_dmc_wl_check_range(). In upcoming changes, we will be using more
than a single table and will extract the range checking logic into a
dedicated function that takes a range table as argument. As we will not
able to use ARRAY_SIZE() then, let's make range tables contain a
sentinel item at the end and use that instead of having to pass the size
as parameter in this future function.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-7-gustavo.sousa@intel.com
drivers/gpu/drm/i915/display/intel_dmc_wl.c