From patchwork Wed Apr 2 10:21:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 14035763 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61583235BF0; Wed, 2 Apr 2025 10:22:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743589380; cv=none; b=ODduZWZQRKbVUJ7bLZZ+0P0gjFTjXY52BiGynCvl4n5Lxg0nhRj0nIEC9uNZQl5kOEAP2o99iHCC7UV7xuNRkj5Qci9o5ccIlgEs88ROgp7q6WZNwyEJyJKu7tfjXfOnF22xs0J/0qmT1pot7vKnQPX5dp4xH+YVnXNFX359O/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743589380; c=relaxed/simple; bh=squ4J4KXqQBUlULcmYlzGzCJxkIWghsxDRs1Te4RYrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aw9YF1m8clFs8czFVlejkXh4kszvfRrjLsNJF0hYceyPEuud1A6r4dy7h4noCFg6fRxQnaDnirwkQebmE/610MueXynHvzx3nT5WoOWlckZvwO+FIGvaxFEKNFS7aINu1CfqQn2z3wMGkPgP5LEIozBFohJamM3D3Cimp8oUayg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: 8DhZlcFmRD+SX+ZVORO7JQ== X-CSE-MsgGUID: 2NZbHlx2RQSYRmPQWsIsTQ== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 02 Apr 2025 19:22:58 +0900 Received: from localhost.localdomain (unknown [10.226.93.220]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 498184222E70; Wed, 2 Apr 2025 19:22:55 +0900 (JST) From: Biju Das To: Marc Kleine-Budde , Vincent Mailhol Cc: Biju Das , Wolfram Sang , Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , linux-can@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v8 06/19] can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro Date: Wed, 2 Apr 2025 11:21:58 +0100 Message-ID: <20250402102226.28032-7-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250402102226.28032-1-biju.das.jz@bp.renesas.com> References: <20250402102226.28032-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro as the num_rules can never be larger than number of supported rules. Signed-off-by: Biju Das --- v8: * New patch --- drivers/net/can/rcar/rcar_canfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 34b918e8ec1c..8205e4ada12e 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -91,8 +91,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)