drm/i915/gmbus: combine gmbus pin lookups to one function
authorJani Nikula <jani.nikula@intel.com>
Thu, 3 Mar 2022 18:19:27 +0000 (20:19 +0200)
committerJani Nikula <jani.nikula@intel.com>
Fri, 4 Mar 2022 09:15:00 +0000 (11:15 +0200)
commit69e807a5a9ffe595853277cb00d7d3fdd583b0fa
tree476e79234b82b2becd90e1dfb0b6598c1e8fe415
parent8d80cceecdd98de6d2281d39d6571a1fe08e5af9
drm/i915/gmbus: combine gmbus pin lookups to one function

Combine the platform specific if ladders for array lookup and size
checks into one. This is cleaner and avoids duplication, but hopefully
also helps any static analyzers that seem to have trouble with the
bounds checks.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220303181931.1661767-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_gmbus.c