From: Lucas De Marchi Date: Fri, 20 Jan 2023 19:34:55 +0000 (-0800) Subject: drm/i915: Convert _FIA() to _PICK_EVEN_2RANGES() X-Git-Tag: v6.6.7~1918^2~17^2~629 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c886118bd8f574a635dda176b2460c03c28b1177;p=platform%2Fkernel%2Flinux-starfive.git drm/i915: Convert _FIA() to _PICK_EVEN_2RANGES() _FIA() can use _PICK_EVEN_2RANGES instead of _PICK, which reduces the size and is safer. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230120193457.3295977-7-lucas.demarchi@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_mg_phy_regs.h b/drivers/gpu/drm/i915/display/intel_mg_phy_regs.h index 0e8248b..0306ade 100644 --- a/drivers/gpu/drm/i915/display/intel_mg_phy_regs.h +++ b/drivers/gpu/drm/i915/display/intel_mg_phy_regs.h @@ -142,7 +142,9 @@ #define FIA1_BASE 0x163000 #define FIA2_BASE 0x16E000 #define FIA3_BASE 0x16F000 -#define _FIA(fia) _PICK((fia), FIA1_BASE, FIA2_BASE, FIA3_BASE) +#define _FIA(fia) _PICK_EVEN_2RANGES((fia), 1, \ + FIA1_BASE, FIA1_BASE,\ + FIA2_BASE, FIA3_BASE) #define _MMIO_FIA(fia, off) _MMIO(_FIA(fia) + (off)) /* ICL PHY DFLEX registers */