From: Biju Das Date: Thu, 17 Apr 2025 05:43:07 +0000 (+0100) Subject: can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c9e17c91f1656f90b06e5cd2f39dfaab08de9611;p=users%2Fjedix%2Flinux-maple.git can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro as the num_rules can never be larger than number of supported rules. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-7-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index d53aa71f11c4..45d0c34f64f6 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -92,8 +92,7 @@ /* RSCFDnCFDGAFLCFG0 / RSCFDnGAFLCFG0 */ #define RCANFD_GAFLCFG_SETRNC(gpriv, n, x) \ - (((x) & reg_gen4(gpriv, 0x1ff, 0xff)) << \ - (reg_gen4(gpriv, 16, 24) - ((n) & 1) * reg_gen4(gpriv, 16, 8))) + ((x) << (reg_gen4(gpriv, 16, 24) - ((n) & 1) * reg_gen4(gpriv, 16, 8))) /* RSCFDnCFDGAFLECTR / RSCFDnGAFLECTR */ #define RCANFD_GAFLECTR_AFLDAE BIT(8)