Skip to contentSkip to conversation

pull-request: can-next 2021-08-25

PATCH New Marc Kleine-Budde 2 participants 6 messages Aug 25, 2021

Subsystems (4)
lore
Share & tools
lore

Marc Kleine-Budde

author maintainer
#0 lore raw

Hello Jakub, hello David,

this is a pull request of 4 patches for net-next/master.

The first patch is by Cai Huoqing, and enables COMPILE_TEST for the rcar CAN drivers.

Lad Prabhakar contributes a patch for the rcar_canfd driver, fixing a redundant assignment.

The last 2 patches are by Tang Bin, target the mscan driver, and clean up the driver by converting it to of_device_get_match_data() and removing a useless BUG_ON.

regards,
Marc

---
The following changes since commit a37c5c26693eadb3aa4101d8fe955e40d206b386:

net: bridge: change return type of br_handle_ingress_vlan_tunnel (2021-08-24 16:51:09 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-5.15-20210825

for you to fetch changes up to cbe8cd7d83e251bff134a57ea4b6378db992ad82:

can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): remove useless BUG_ON() (2021-08-25 08:25:11 +0200)

----------------------------------------------------------------
linux-can-next-for-5.15-20210825

----------------------------------------------------------------
Cai Huoqing (1):
can: rcar: Kconfig: Add helper dependency on COMPILE_TEST

Lad Prabhakar (1):
can: rcar_canfd: rcar_canfd_handle_channel_tx(): fix redundant assignment

Tang Bin (2):
can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): use of_device_get_match_data to simplify code
can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): remove useless BUG_ON()

 drivers/net/can/mscan/mpc5xxx_can.c | 7 ++-----
 drivers/net/can/rcar/Kconfig        | 4 ++--
 drivers/net/can/rcar/rcar_canfd.c   | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)
author maintainer
#1 lore raw

PATCH 1/4 can: rcar: Kconfig: Add helper dependency on COMPILE_TEST

From: Cai Huoqing <[email protected]>

it's helpful for complie test in other platform(e.g.X86)

---
 drivers/net/can/rcar/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/rcar/Kconfig +2 -2
index 29cabc20109e..56320a7f828b 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 config CAN_RCAR
 	tristate "Renesas R-Car and RZ/G CAN controller"
-	depends on ARCH_RENESAS || ARM
+	depends on ARCH_RENESAS || ARM || COMPILE_TEST
 	help
 	  Say Y here if you want to use CAN controller found on Renesas R-Car
 	  or RZ/G SoCs.
@@ -11,7 +11,7 @@ config CAN_RCAR
 
 config CAN_RCAR_CANFD
 	tristate "Renesas R-Car CAN FD controller"
-	depends on ARCH_RENESAS || ARM
+	depends on ARCH_RENESAS || ARM || COMPILE_TEST
 	help
 	  Say Y here if you want to use CAN FD controller found on
 	  Renesas R-Car SoCs. The driver puts the controller in CAN FD only

base-commit: a37c5c26693eadb3aa4101d8fe955e40d206b386

Signature · 1 line
2.32.0
author maintainer
#2 lore raw

PATCH 2/4 can: rcar_canfd: rcar_canfd_handle_channel_tx(): fix redundant assignment

In reply to Marc Kleine-Budde

From: Lad Prabhakar <[email protected]>

Fix redundant assignment of 'priv' to itself in
rcar_canfd_handle_channel_tx().

Fixes 76e9353a80e9 ("can: rcar_canfd: Add support for RZ/G2L family")
---
 drivers/net/can/rcar/rcar_canfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/rcar/rcar_canfd.c +1 -1
index 5d4d52afde15..c47988d3674e 100644
@@ -1182,7 +1182,7 @@ static void rcar_canfd_state_change(struct net_device *ndev,
 
 static void rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch)
 {
-	struct rcar_canfd_channel *priv = priv = gpriv->ch[ch];
+	struct rcar_canfd_channel *priv = gpriv->ch[ch];
 	struct net_device *ndev = priv->ndev;
 	u32 sts;
 
Signature · 1 line
2.32.0
author maintainer
#3 lore raw

PATCH 3/4 can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): use of_device_get_match_data to simplify code

In reply to Marc Kleine-Budde

From: Tang Bin <[email protected]>

Retrieve OF match data, it's better and cleaner to use 'of_device_get_match_data' over 'of_match_device'.

---
 drivers/net/can/mscan/mpc5xxx_can.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/can/mscan/mpc5xxx_can.c +2 -4
index e254e04ae257..3b7465acd35c 100644
@@ -279,7 +279,6 @@ static u32 mpc512x_can_get_clock(struct platform_device *ofdev,
 static const struct of_device_id mpc5xxx_can_table[];
 static int mpc5xxx_can_probe(struct platform_device *ofdev)
 {
-	const struct of_device_id *match;
 	const struct mpc5xxx_can_data *data;
 	struct device_node *np = ofdev->dev.of_node;
 	struct net_device *dev;
@@ -289,10 +288,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
 	int irq, mscan_clksrc = 0;
 	int err = -ENOMEM;
 
-	match = of_match_device(mpc5xxx_can_table, &ofdev->dev);
-	if (!match)
+	data = of_device_get_match_data(&ofdev->dev);
+	if (!data)
 		return -EINVAL;
-	data = match->data;
 
 	base = of_iomap(np, 0);
 	if (!base) {
Signature · 1 line
2.32.0
author maintainer
#4 lore raw

PATCH 4/4 can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): remove useless BUG_ON()

In reply to Marc Kleine-Budde

From: Tang Bin <[email protected]>

In the function mpc5xxx_can_probe(), the variable 'data' has already been determined in the above code, so the BUG_ON() in this place is useless, remove it.

---
 drivers/net/can/mscan/mpc5xxx_can.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/can/mscan/mpc5xxx_can.c +0 -1
index 3b7465acd35c..35892c1efef0 100644
@@ -317,7 +317,6 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
 
 	clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL);
 
-	BUG_ON(!data);
 	priv->type = data->type;
 	priv->can.clock.freq = data->get_clock(ofdev, clock_name,
 					       &mscan_clksrc);
Signature · 1 line
2.32.0
#5 lore raw
In reply to Marc Kleine-Budde
This pull request was applied to netdev/net-next.git (refs/heads/master):

Hello:

This pull request was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Wed, 25 Aug 2021 11:35:12 +0200 you wrote:

Hello Jakub, hello David,

this is a pull request of 4 patches for net-next/master.

The first patch is by Cai Huoqing, and enables COMPILE_TEST for the rcar CAN drivers.

[...]

Here is the summary with links:
- pull-request: can-next 2021-08-25

    https://git.kernel.org/netdev/net-next/c/45bc6125d142
  - [net-next,2/4] can: rcar_canfd: rcar_canfd_handle_channel_tx(): fix redundant assignment
    https://git.kernel.org/netdev/net-next/c/1d38ec497414
  - [net-next,3/4] can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): use of_device_get_match_data to simplify code
    https://git.kernel.org/netdev/net-next/c/a4583c1deb1b
  - [net-next,4/4] can: mscan: mpc5xxx_can: mpc5xxx_can_probe(): remove useless BUG_ON()
    https://git.kernel.org/netdev/net-next/c/cbe8cd7d83e2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html