linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] dt-binding, bittiming and other cleanups
@ 2022-01-24 21:56 Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings Marc Kleine-Budde
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can

Hello,

here are some cleanup patches which will be included in my next pull
request to net-next/master.

regards,
Marc




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 2/9] dt-binding: can: sun4i_can: " Marc Kleine-Budde
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Manivannan Sadhasivam, Thomas Kopp

Since commit

| 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")

there is a common CAN controller binding. Add this to the mcp251xfd
binding.

Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Thomas Kopp <thomas.kopp@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../devicetree/bindings/net/can/microchip,mcp251xfd.yaml       | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml
index 2a884c1fe0e0..b3826af6bd6e 100644
--- a/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml
@@ -11,6 +11,9 @@ title:
 maintainers:
   - Marc Kleine-Budde <mkl@pengutronix.de>
 
+allOf:
+  - $ref: can-controller.yaml#
+
 properties:
   compatible:
     oneOf:
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/9] dt-binding: can: sun4i_can: include common CAN controller bindings
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 3/9] dt-binding: can: m_can: " Marc Kleine-Budde
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Evgeny Boger, Gerhard Bertelsmann

Since commit

| 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")

there is a common CAN controller binding. Add this to the sun4i_can
binding.

Cc: Evgeny Boger <boger@wirenboard.com>
Cc: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml b/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml
index c93fe9d3ea82..3c51b2d02957 100644
--- a/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml
+++ b/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml
@@ -10,6 +10,9 @@ maintainers:
   - Chen-Yu Tsai <wens@csie.org>
   - Maxime Ripard <mripard@kernel.org>
 
+allOf:
+  - $ref: can-controller.yaml#
+
 properties:
   compatible:
     oneOf:
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/9] dt-binding: can: m_can: include common CAN controller bindings
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 2/9] dt-binding: can: sun4i_can: " Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-02-17 16:05   ` Chandrasekar R
  2022-01-24 21:56 ` [PATCH 4/9] dt-binding: can: rcar-can: " Marc Kleine-Budde
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Chandrasekar Ramakrishnan

Since commit

| 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")

there is a common CAN controller binding. Add this to the m_can
binding.

Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
index fb547e26c676..710880dc7594 100644
--- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
+++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
@@ -11,6 +11,9 @@ description: Bosch MCAN controller for CAN bus
 maintainers:
   - Sriram Dash <sriram.dash@samsung.com>
 
+allOf:
+  - $ref: can-controller.yaml#
+
 properties:
   compatible:
     const: bosch,m_can
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/9] dt-binding: can: rcar-can: include common CAN controller bindings
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (2 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 3/9] dt-binding: can: m_can: " Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 5/9] can: bittiming: can_validate_bitrate(): simplify bit rate checking Marc Kleine-Budde
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can
  Cc: Marc Kleine-Budde, Yoshihiro Shimoda, Fabrizio Castro, lrich Hecht

Since commit

| 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")

there is a common CAN controller binding. Add this to the rcar-can
binding.

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Cc: lrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../devicetree/bindings/net/can/renesas,rcar-can.yaml          | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-can.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-can.yaml
index fadc871fd6b0..64247d3635e9 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-can.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-can.yaml
@@ -9,6 +9,9 @@ title: Renesas R-Car CAN Controller
 maintainers:
   - Sergei Shtylyov <sergei.shtylyov@gmail.com>
 
+allOf:
+  - $ref: can-controller.yaml#
+
 properties:
   compatible:
     oneOf:
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/9] can: bittiming: can_validate_bitrate(): simplify bit rate checking
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (3 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 4/9] dt-binding: can: rcar-can: " Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 6/9] can: bittiming: mark function arguments and local variables as const Marc Kleine-Budde
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde

This patch simplifies the validation of the fixed bit rates. If a
supported bit rate is found, directly return 0.

If no valid bit rate is found return -EINVAL;

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/dev/bittiming.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/can/dev/bittiming.c b/drivers/net/can/dev/bittiming.c
index d5fca3bfaf9a..1b1d1499e2f1 100644
--- a/drivers/net/can/dev/bittiming.c
+++ b/drivers/net/can/dev/bittiming.c
@@ -248,18 +248,14 @@ can_validate_bitrate(struct net_device *dev, struct can_bittiming *bt,
 		     const u32 *bitrate_const,
 		     const unsigned int bitrate_const_cnt)
 {
-	struct can_priv *priv = netdev_priv(dev);
 	unsigned int i;
 
 	for (i = 0; i < bitrate_const_cnt; i++) {
 		if (bt->bitrate == bitrate_const[i])
-			break;
+			return 0;
 	}
 
-	if (i >= priv->bitrate_const_cnt)
-		return -EINVAL;
-
-	return 0;
+	return -EINVAL;
 }
 
 int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/9] can: bittiming: mark function arguments and local variables as const
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (4 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 5/9] can: bittiming: can_validate_bitrate(): simplify bit rate checking Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 7/9] can: drivers: don't print IO remapped address of base registers Marc Kleine-Budde
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde

This patch marks the arguments of some functions as well as some local
variables as constant.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/dev/bittiming.c | 12 ++++++------
 include/linux/can/bittiming.h   |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/can/dev/bittiming.c b/drivers/net/can/dev/bittiming.c
index 1b1d1499e2f1..2103bcca9012 100644
--- a/drivers/net/can/dev/bittiming.c
+++ b/drivers/net/can/dev/bittiming.c
@@ -24,7 +24,7 @@
  */
 static int
 can_update_sample_point(const struct can_bittiming_const *btc,
-			unsigned int sample_point_nominal, unsigned int tseg,
+			const unsigned int sample_point_nominal, const unsigned int tseg,
 			unsigned int *tseg1_ptr, unsigned int *tseg2_ptr,
 			unsigned int *sample_point_error_ptr)
 {
@@ -63,7 +63,7 @@ can_update_sample_point(const struct can_bittiming_const *btc,
 	return best_sample_point;
 }
 
-int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,
+int can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 		       const struct can_bittiming_const *btc)
 {
 	struct can_priv *priv = netdev_priv(dev);
@@ -208,10 +208,10 @@ void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
  * prescaler value brp. You can find more information in the header
  * file linux/can/netlink.h.
  */
-static int can_fixup_bittiming(struct net_device *dev, struct can_bittiming *bt,
+static int can_fixup_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 			       const struct can_bittiming_const *btc)
 {
-	struct can_priv *priv = netdev_priv(dev);
+	const struct can_priv *priv = netdev_priv(dev);
 	unsigned int tseg1, alltseg;
 	u64 brp64;
 
@@ -244,7 +244,7 @@ static int can_fixup_bittiming(struct net_device *dev, struct can_bittiming *bt,
 
 /* Checks the validity of predefined bitrate settings */
 static int
-can_validate_bitrate(struct net_device *dev, struct can_bittiming *bt,
+can_validate_bitrate(const struct net_device *dev, const struct can_bittiming *bt,
 		     const u32 *bitrate_const,
 		     const unsigned int bitrate_const_cnt)
 {
@@ -258,7 +258,7 @@ can_validate_bitrate(struct net_device *dev, struct can_bittiming *bt,
 	return -EINVAL;
 }
 
-int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,
+int can_get_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 		      const struct can_bittiming_const *btc,
 		      const u32 *bitrate_const,
 		      const unsigned int bitrate_const_cnt)
diff --git a/include/linux/can/bittiming.h b/include/linux/can/bittiming.h
index a81652d1c6f3..7ae21c0f7f23 100644
--- a/include/linux/can/bittiming.h
+++ b/include/linux/can/bittiming.h
@@ -113,7 +113,7 @@ struct can_tdc_const {
 };
 
 #ifdef CONFIG_CAN_CALC_BITTIMING
-int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,
+int can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 		       const struct can_bittiming_const *btc);
 
 void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
@@ -121,7 +121,7 @@ void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
 		   u32 *ctrlmode, u32 ctrlmode_supported);
 #else /* !CONFIG_CAN_CALC_BITTIMING */
 static inline int
-can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,
+can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 		   const struct can_bittiming_const *btc)
 {
 	netdev_err(dev, "bit-timing calculation not available\n");
@@ -136,7 +136,7 @@ can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
 }
 #endif /* CONFIG_CAN_CALC_BITTIMING */
 
-int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,
+int can_get_bittiming(const struct net_device *dev, struct can_bittiming *bt,
 		      const struct can_bittiming_const *btc,
 		      const u32 *bitrate_const,
 		      const unsigned int bitrate_const_cnt);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/9] can: drivers: don't print IO remapped address of base registers
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (5 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 6/9] can: bittiming: mark function arguments and local variables as const Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-25  8:48   ` Alexandre Belloni
  2022-01-24 21:56 ` [PATCH 8/9] can: kvaser_usb: kvaser_usb_send_cmd(): remove redundant variable actual_len Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 9/9] can: c_can: ethtool: use default drvinfo Marc Kleine-Budde
  8 siblings, 1 reply; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can
  Cc: Marc Kleine-Budde, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Michal Simek, Dario Binacchi, Zheyu Ma, Stephane Grosjean,
	Lad Prabhakar, linux-sunxi

This patch removes the printing of the IO remapped base registers of
all CAN devices. As documented in

| Documentation/core-api/printk-formats.rst,

to prevent information leaks a hashed value of the address is printed,
until the kernel gathers enough entropy only "(ptrval)" is displayed.

This patch removes the printing of the base address as the information
is not really useful.

Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Cc: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Dario Binacchi <dariobin@libero.it>
Cc: Zheyu Ma <zheyuma97@gmail.com>
Cc: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: linux-sunxi@lists.linux.dev
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/at91_can.c                    | 3 +--
 drivers/net/can/c_can/c_can_pci.c             | 4 ++--
 drivers/net/can/c_can/c_can_platform.c        | 4 ++--
 drivers/net/can/cc770/cc770.c                 | 6 ++----
 drivers/net/can/cc770/cc770_isa.c             | 3 +--
 drivers/net/can/cc770/cc770_platform.c        | 4 ++--
 drivers/net/can/grcan.c                       | 4 ++--
 drivers/net/can/ifi_canfd/ifi_canfd.c         | 4 ++--
 drivers/net/can/mscan/mpc5xxx_can.c           | 4 ++--
 drivers/net/can/peak_canfd/peak_pciefd_main.c | 4 ++--
 drivers/net/can/sja1000/ems_pci.c             | 4 ++--
 drivers/net/can/sja1000/ems_pcmcia.c          | 4 ++--
 drivers/net/can/sja1000/f81601.c              | 4 ++--
 drivers/net/can/sja1000/kvaser_pci.c          | 3 +--
 drivers/net/can/sja1000/peak_pci.c            | 4 +---
 drivers/net/can/sja1000/peak_pcmcia.c         | 4 ++--
 drivers/net/can/sja1000/plx_pci.c             | 4 ++--
 drivers/net/can/sja1000/sja1000_isa.c         | 4 ++--
 drivers/net/can/sja1000/sja1000_platform.c    | 4 ++--
 drivers/net/can/sun4i_can.c                   | 4 ++--
 drivers/net/can/ti_hecc.c                     | 3 +--
 drivers/net/can/xilinx_can.c                  | 4 ++--
 22 files changed, 39 insertions(+), 47 deletions(-)

diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index a00655ccda02..5a7f96791014 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -1333,8 +1333,7 @@ static int at91_can_probe(struct platform_device *pdev)
 
 	devm_can_led_init(dev);
 
-	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%d)\n",
-		 priv->reg_base, dev->irq);
+	dev_info(&pdev->dev, "device registered (irq=%d)\n", dev->irq);
 
 	return 0;
 
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index bf2f8c3da1c1..5992a712acdb 100644
--- a/drivers/net/can/c_can/c_can_pci.c
+++ b/drivers/net/can/c_can/c_can_pci.c
@@ -216,8 +216,8 @@ static int c_can_pci_probe(struct pci_dev *pdev,
 		goto out_free_c_can;
 	}
 
-	dev_dbg(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
-		KBUILD_MODNAME, priv->regs, dev->irq);
+	dev_dbg(&pdev->dev, "%s device registered (irq=%d)\n",
+		KBUILD_MODNAME, dev->irq);
 
 	return 0;
 
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 86e95e9d6533..2f089098da90 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -398,8 +398,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
 		goto exit_free_device;
 	}
 
-	dev_info(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
-		 KBUILD_MODNAME, priv->base, dev->irq);
+	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
+		 KBUILD_MODNAME, dev->irq);
 	return 0;
 
 exit_free_device:
diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c
index bb7224cfc6ab..4ebac0312a18 100644
--- a/drivers/net/can/cc770/cc770.c
+++ b/drivers/net/can/cc770/cc770.c
@@ -300,8 +300,7 @@ static int cc770_probe_chip(struct net_device *dev)
 	 * is no chip in this address space
 	 */
 	if (cc770_read_reg(priv, cpu_interface) & CPUIF_RST) {
-		netdev_info(dev, "probing @0x%p failed (reset)\n",
-			    priv->reg_base);
+		netdev_info(dev, "probing failed (reset)\n");
 		return -ENODEV;
 	}
 
@@ -312,8 +311,7 @@ static int cc770_probe_chip(struct net_device *dev)
 	if ((cc770_read_reg(priv, msgobj[1].data[1]) != 0x25) ||
 	    (cc770_read_reg(priv, msgobj[2].data[3]) != 0x52) ||
 	    (cc770_read_reg(priv, msgobj[10].data[6]) != 0xc3)) {
-		netdev_info(dev, "probing @0x%p failed (pattern)\n",
-			    priv->reg_base);
+		netdev_info(dev, "probing failed (pattern)\n");
 		return -ENODEV;
 	}
 
diff --git a/drivers/net/can/cc770/cc770_isa.c b/drivers/net/can/cc770/cc770_isa.c
index 194c86e0f340..372de4d18a7f 100644
--- a/drivers/net/can/cc770/cc770_isa.c
+++ b/drivers/net/can/cc770/cc770_isa.c
@@ -267,8 +267,7 @@ static int cc770_isa_probe(struct platform_device *pdev)
 		goto exit_unmap;
 	}
 
-	dev_info(&pdev->dev, "device registered (reg_base=0x%p, irq=%d)\n",
-		 priv->reg_base, dev->irq);
+	dev_info(&pdev->dev, "device registered (irq=%d)\n", dev->irq);
 	return 0;
 
  exit_unmap:
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index 8d916e2ee6c2..2049921eed89 100644
--- a/drivers/net/can/cc770/cc770_platform.c
+++ b/drivers/net/can/cc770/cc770_platform.c
@@ -203,9 +203,9 @@ static int cc770_platform_probe(struct platform_device *pdev)
 		goto exit_free_cc770;
 
 	dev_dbg(&pdev->dev,
-		 "reg_base=0x%p irq=%d clock=%d cpu_interface=0x%02x "
+		 "irq=%d clock=%d cpu_interface=0x%02x "
 		 "bus_config=0x%02x clkout=0x%02x\n",
-		 priv->reg_base, dev->irq, priv->can.clock.freq,
+		 dev->irq, priv->can.clock.freq,
 		 priv->cpu_interface, priv->bus_config, priv->clkout);
 
 	platform_set_drvdata(pdev, dev);
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
index d0c5a7a60daf..80e1485675a9 100644
--- a/drivers/net/can/grcan.c
+++ b/drivers/net/can/grcan.c
@@ -1616,8 +1616,8 @@ static int grcan_setup_netdev(struct platform_device *ofdev,
 	netif_napi_add(dev, &priv->napi, grcan_poll, GRCAN_NAPI_WEIGHT);
 
 	SET_NETDEV_DEV(dev, &ofdev->dev);
-	dev_info(&ofdev->dev, "regs=0x%p, irq=%d, clock=%d\n",
-		 priv->regs, dev->irq, priv->can.clock.freq);
+	dev_info(&ofdev->dev, "irq=%d, clock=%d\n",
+		 dev->irq, priv->can.clock.freq);
 
 	err = register_candev(dev);
 	if (err)
diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
index b0a3473f211d..82aeac04ad89 100644
--- a/drivers/net/can/ifi_canfd/ifi_canfd.c
+++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
@@ -1006,8 +1006,8 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
 
 	devm_can_led_init(ndev);
 
-	dev_info(dev, "Driver registered: regs=%p, irq=%d, clock=%d\n",
-		 priv->base, ndev->irq, priv->can.clock.freq);
+	dev_info(dev, "Driver registered: irq=%d, clock=%d\n",
+		 ndev->irq, priv->can.clock.freq);
 
 	return 0;
 
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index de4ddf79ba9b..3d577489b5fb 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -330,8 +330,8 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
 		goto exit_free_mscan;
 	}
 
-	dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
-		 priv->reg_base, dev->irq, priv->can.clock.freq);
+	dev_info(&ofdev->dev, "MSCAN at irq %d, clock %d Hz\n",
+		 dev->irq, priv->can.clock.freq);
 
 	return 0;
 
diff --git a/drivers/net/can/peak_canfd/peak_pciefd_main.c b/drivers/net/can/peak_canfd/peak_pciefd_main.c
index 1df3c4b54f03..be483b82c314 100644
--- a/drivers/net/can/peak_canfd/peak_pciefd_main.c
+++ b/drivers/net/can/peak_canfd/peak_pciefd_main.c
@@ -678,8 +678,8 @@ static int pciefd_can_probe(struct pciefd_board *pciefd)
 	/* save the object address in the board structure */
 	pciefd->can[pciefd->can_count] = priv;
 
-	dev_info(&pciefd->pci_dev->dev, "%s at reg_base=0x%p irq=%d\n",
-		 ndev->name, priv->reg_base, ndev->irq);
+	dev_info(&pciefd->pci_dev->dev, "%s at irq=%d\n",
+		 ndev->name, pciefd->pci_dev->irq);
 
 	return 0;
 
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index 4ab91759a5c6..cab01076f60f 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -333,8 +333,8 @@ static int ems_pci_add_card(struct pci_dev *pdev,
 
 			card->channels++;
 
-			dev_info(&pdev->dev, "Channel #%d at 0x%p, irq %d\n",
-					i + 1, priv->reg_base, dev->irq);
+			dev_info(&pdev->dev, "Channel #%d, irq %d\n",
+					i + 1, dev->irq);
 		} else {
 			free_sja1000dev(dev);
 		}
diff --git a/drivers/net/can/sja1000/ems_pcmcia.c b/drivers/net/can/sja1000/ems_pcmcia.c
index 4642b6d4aaf7..4f267566edbb 100644
--- a/drivers/net/can/sja1000/ems_pcmcia.c
+++ b/drivers/net/can/sja1000/ems_pcmcia.c
@@ -228,8 +228,8 @@ static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)
 			card->channels++;
 
 			printk(KERN_INFO "%s: registered %s on channel "
-			       "#%d at 0x%p, irq %d\n", DRV_NAME, dev->name,
-			       i, priv->reg_base, dev->irq);
+			       "#%d, irq %d\n", DRV_NAME, dev->name,
+			       i, dev->irq);
 		} else
 			free_sja1000dev(dev);
 	}
diff --git a/drivers/net/can/sja1000/f81601.c b/drivers/net/can/sja1000/f81601.c
index 8f25e95814ef..8e2ba36866fe 100644
--- a/drivers/net/can/sja1000/f81601.c
+++ b/drivers/net/can/sja1000/f81601.c
@@ -184,8 +184,8 @@ static int f81601_pci_probe(struct pci_dev *pdev,
 		}
 
 		card->net_dev[i] = dev;
-		dev_info(&pdev->dev, "Channel #%d, %s at 0x%p, irq %d\n", i,
-			 dev->name, priv->reg_base, dev->irq);
+		dev_info(&pdev->dev, "Channel #%d, %s, irq %d\n", i,
+			 dev->name, dev->irq);
 	}
 
 	return 0;
diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c
index 95fe9ee1ce32..b9371579acd2 100644
--- a/drivers/net/can/sja1000/kvaser_pci.c
+++ b/drivers/net/can/sja1000/kvaser_pci.c
@@ -251,8 +251,7 @@ static int kvaser_pci_add_chan(struct pci_dev *pdev, int channel,
 	priv->irq_flags = IRQF_SHARED;
 	dev->irq = pdev->irq;
 
-	dev_info(&pdev->dev, "reg_base=%p conf_addr=%p irq=%d\n",
-		 priv->reg_base, board->conf_addr, dev->irq);
+	dev_info(&pdev->dev, "irq=%d\n", dev->irq);
 
 	SET_NETDEV_DEV(dev, &pdev->dev);
 	dev->dev_id = channel;
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index 84f34020aafb..71e84e2f9773 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -686,9 +686,7 @@ static int peak_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			goto failure_free_dev;
 		}
 
-		dev_info(&pdev->dev,
-			 "%s at reg_base=0x%p cfg_base=0x%p irq=%d\n",
-			 dev->name, priv->reg_base, chan->cfg_base, dev->irq);
+		dev_info(&pdev->dev, "%s at irq=%d\n", dev->name, dev->irq);
 	}
 
 	/* Enable interrupts */
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
index 131a084c3535..743780947c0b 100644
--- a/drivers/net/can/sja1000/peak_pcmcia.c
+++ b/drivers/net/can/sja1000/peak_pcmcia.c
@@ -580,8 +580,8 @@ static int pcan_add_channels(struct pcan_pccard *card)
 		ccr &= ~PCC_CCR_LED_OFF_CHAN(i);
 
 		dev_info(&pdev->dev,
-			"%s on channel %d at 0x%p irq %d\n",
-			netdev->name, i, priv->reg_base, pdev->irq);
+			"%s on channel %d at irq %d\n",
+			netdev->name, i, pdev->irq);
 	}
 
 	/* write new ccr (change leds state) */
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 5de1ebb0c6f0..568e2efed76f 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -704,8 +704,8 @@ static int plx_pci_add_card(struct pci_dev *pdev,
 
 			card->channels++;
 
-			dev_info(&pdev->dev, "Channel #%d at 0x%p, irq %d "
-				 "registered as %s\n", i + 1, priv->reg_base,
+			dev_info(&pdev->dev, "Channel #%d at irq %d "
+				 "registered as %s\n", i + 1,
 				 dev->irq, dev->name);
 		} else {
 			dev_err(&pdev->dev, "Channel #%d not detected\n",
diff --git a/drivers/net/can/sja1000/sja1000_isa.c b/drivers/net/can/sja1000/sja1000_isa.c
index d513fac50718..9fe0f3d72d9f 100644
--- a/drivers/net/can/sja1000/sja1000_isa.c
+++ b/drivers/net/can/sja1000/sja1000_isa.c
@@ -205,8 +205,8 @@ static int sja1000_isa_probe(struct platform_device *pdev)
 		goto exit_unmap;
 	}
 
-	dev_info(&pdev->dev, "%s device registered (reg_base=0x%p, irq=%d)\n",
-		 DRV_NAME, priv->reg_base, dev->irq);
+	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
+		 DRV_NAME, dev->irq);
 	return 0;
 
  exit_unmap:
diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c
index f9ec7bd8dfac..ff99fe711d0b 100644
--- a/drivers/net/can/sja1000/sja1000_platform.c
+++ b/drivers/net/can/sja1000/sja1000_platform.c
@@ -288,8 +288,8 @@ static int sp_probe(struct platform_device *pdev)
 		goto exit_free;
 	}
 
-	dev_info(&pdev->dev, "%s device registered (reg_base=%p, irq=%d)\n",
-		 DRV_NAME, priv->reg_base, dev->irq);
+	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
+		 DRV_NAME, dev->irq);
 	return 0;
 
  exit_free:
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
index 25d6d81ab4f4..04f93c2f8eca 100644
--- a/drivers/net/can/sun4i_can.c
+++ b/drivers/net/can/sun4i_can.c
@@ -885,8 +885,8 @@ static int sun4ican_probe(struct platform_device *pdev)
 	}
 	devm_can_led_init(dev);
 
-	dev_info(&pdev->dev, "device registered (base=%p, irq=%d)\n",
-		 priv->base, dev->irq);
+	dev_info(&pdev->dev, "device registered (irq=%d)\n",
+		 dev->irq);
 
 	return 0;
 
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index ff31b993ab17..fbb0b7b7c16e 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -956,8 +956,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
 
 	devm_can_led_init(ndev);
 
-	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%u)\n",
-		 priv->base, (u32)ndev->irq);
+	dev_info(&pdev->dev, "device registered (irq=%u)\n", (u32)ndev->irq);
 
 	return 0;
 
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 1674b561c9a2..2c5a030c29e7 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1820,8 +1820,8 @@ static int xcan_probe(struct platform_device *pdev)
 		priv->write_reg(priv, XCAN_AFR_2_MASK_OFFSET, 0x00000000);
 	}
 
-	netdev_dbg(ndev, "reg_base=0x%p irq=%d clock=%d, tx buffers: actual %d, using %d\n",
-		   priv->reg_base, ndev->irq, priv->can.clock.freq,
+	netdev_dbg(ndev, "irq=%d clock=%d, tx buffers: actual %d, using %d\n",
+		   ndev->irq, priv->can.clock.freq,
 		   hw_tx_max, priv->tx_max);
 
 	return 0;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/9] can: kvaser_usb: kvaser_usb_send_cmd(): remove redundant variable actual_len
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (6 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 7/9] can: drivers: don't print IO remapped address of base registers Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  2022-01-24 21:56 ` [PATCH 9/9] can: c_can: ethtool: use default drvinfo Marc Kleine-Budde
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Jimmy Assarsson

The function usb_bulk_msg() can be called with a NULL pointer as the
"actual_length" parameter. This patch removes this variable.

Cc: Jimmy Assarsson <extja@kvaser.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
index c4b4d3d0a387..e67658b53d02 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
@@ -205,12 +205,10 @@ MODULE_DEVICE_TABLE(usb, kvaser_usb_table);
 
 int kvaser_usb_send_cmd(const struct kvaser_usb *dev, void *cmd, int len)
 {
-	int actual_len; /* Not used */
-
 	return usb_bulk_msg(dev->udev,
 			    usb_sndbulkpipe(dev->udev,
 					    dev->bulk_out->bEndpointAddress),
-			    cmd, len, &actual_len, KVASER_USB_TIMEOUT);
+			    cmd, len, NULL, KVASER_USB_TIMEOUT);
 }
 
 int kvaser_usb_recv_cmd(const struct kvaser_usb *dev, void *cmd, int len,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 9/9] can: c_can: ethtool: use default drvinfo
  2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
                   ` (7 preceding siblings ...)
  2022-01-24 21:56 ` [PATCH 8/9] can: kvaser_usb: kvaser_usb_send_cmd(): remove redundant variable actual_len Marc Kleine-Budde
@ 2022-01-24 21:56 ` Marc Kleine-Budde
  8 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-01-24 21:56 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Dario Binacchi

The ethtool core implements a default drvinfo.

There's no need to replicate this in the driver, no additional
information is added, so remove this and rely on the default.

Cc: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/c_can/c_can_ethtool.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/can/c_can/c_can_ethtool.c b/drivers/net/can/c_can/c_can_ethtool.c
index 6655146294fc..8a826a6813bd 100644
--- a/drivers/net/can/c_can/c_can_ethtool.c
+++ b/drivers/net/can/c_can/c_can_ethtool.c
@@ -11,14 +11,6 @@
 
 #include "c_can.h"
 
-static void c_can_get_drvinfo(struct net_device *netdev,
-			      struct ethtool_drvinfo *info)
-{
-	struct c_can_priv *priv = netdev_priv(netdev);
-	strscpy(info->driver, "c_can", sizeof(info->driver));
-	strscpy(info->bus_info, dev_name(priv->device), sizeof(info->bus_info));
-}
-
 static void c_can_get_ringparam(struct net_device *netdev,
 				struct ethtool_ringparam *ring,
 				struct kernel_ethtool_ringparam *kernel_ring,
@@ -33,7 +25,6 @@ static void c_can_get_ringparam(struct net_device *netdev,
 }
 
 static const struct ethtool_ops c_can_ethtool_ops = {
-	.get_drvinfo = c_can_get_drvinfo,
 	.get_ringparam = c_can_get_ringparam,
 };
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 7/9] can: drivers: don't print IO remapped address of base registers
  2022-01-24 21:56 ` [PATCH 7/9] can: drivers: don't print IO remapped address of base registers Marc Kleine-Budde
@ 2022-01-25  8:48   ` Alexandre Belloni
  0 siblings, 0 replies; 13+ messages in thread
From: Alexandre Belloni @ 2022-01-25  8:48 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: linux-can, Nicolas Ferre, Ludovic Desroches, Maxime Ripard,
	Chen-Yu Tsai, Jernej Skrabec, Appana Durga Kedareswara rao,
	Naga Sureshkumar Relli, Michal Simek, Dario Binacchi, Zheyu Ma,
	Stephane Grosjean, Lad Prabhakar, linux-sunxi

Hello,

On 24/01/2022 22:56:40+0100, Marc Kleine-Budde wrote:
> This patch removes the printing of the IO remapped base registers of
> all CAN devices. As documented in
> 
> | Documentation/core-api/printk-formats.rst,
> 
> to prevent information leaks a hashed value of the address is printed,
> until the kernel gathers enough entropy only "(ptrval)" is displayed.
> 
> This patch removes the printing of the base address as the information
> is not really useful.

Is the info useful at all? I guess most of the instances could be
replaced by a single dev_info in the can core once the device is
registered and the other ones are failures where the device probing
code would already print the failure.

> 
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
> Cc: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
> Cc: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Dario Binacchi <dariobin@libero.it>
> Cc: Zheyu Ma <zheyuma97@gmail.com>
> Cc: Stephane Grosjean <s.grosjean@peak-system.com>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: linux-sunxi@lists.linux.dev
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/net/can/at91_can.c                    | 3 +--
>  drivers/net/can/c_can/c_can_pci.c             | 4 ++--
>  drivers/net/can/c_can/c_can_platform.c        | 4 ++--
>  drivers/net/can/cc770/cc770.c                 | 6 ++----
>  drivers/net/can/cc770/cc770_isa.c             | 3 +--
>  drivers/net/can/cc770/cc770_platform.c        | 4 ++--
>  drivers/net/can/grcan.c                       | 4 ++--
>  drivers/net/can/ifi_canfd/ifi_canfd.c         | 4 ++--
>  drivers/net/can/mscan/mpc5xxx_can.c           | 4 ++--
>  drivers/net/can/peak_canfd/peak_pciefd_main.c | 4 ++--
>  drivers/net/can/sja1000/ems_pci.c             | 4 ++--
>  drivers/net/can/sja1000/ems_pcmcia.c          | 4 ++--
>  drivers/net/can/sja1000/f81601.c              | 4 ++--
>  drivers/net/can/sja1000/kvaser_pci.c          | 3 +--
>  drivers/net/can/sja1000/peak_pci.c            | 4 +---
>  drivers/net/can/sja1000/peak_pcmcia.c         | 4 ++--
>  drivers/net/can/sja1000/plx_pci.c             | 4 ++--
>  drivers/net/can/sja1000/sja1000_isa.c         | 4 ++--
>  drivers/net/can/sja1000/sja1000_platform.c    | 4 ++--
>  drivers/net/can/sun4i_can.c                   | 4 ++--
>  drivers/net/can/ti_hecc.c                     | 3 +--
>  drivers/net/can/xilinx_can.c                  | 4 ++--
>  22 files changed, 39 insertions(+), 47 deletions(-)
> 
> diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
> index a00655ccda02..5a7f96791014 100644
> --- a/drivers/net/can/at91_can.c
> +++ b/drivers/net/can/at91_can.c
> @@ -1333,8 +1333,7 @@ static int at91_can_probe(struct platform_device *pdev)
>  
>  	devm_can_led_init(dev);
>  
> -	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%d)\n",
> -		 priv->reg_base, dev->irq);
> +	dev_info(&pdev->dev, "device registered (irq=%d)\n", dev->irq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
> index bf2f8c3da1c1..5992a712acdb 100644
> --- a/drivers/net/can/c_can/c_can_pci.c
> +++ b/drivers/net/can/c_can/c_can_pci.c
> @@ -216,8 +216,8 @@ static int c_can_pci_probe(struct pci_dev *pdev,
>  		goto out_free_c_can;
>  	}
>  
> -	dev_dbg(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
> -		KBUILD_MODNAME, priv->regs, dev->irq);
> +	dev_dbg(&pdev->dev, "%s device registered (irq=%d)\n",
> +		KBUILD_MODNAME, dev->irq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
> index 86e95e9d6533..2f089098da90 100644
> --- a/drivers/net/can/c_can/c_can_platform.c
> +++ b/drivers/net/can/c_can/c_can_platform.c
> @@ -398,8 +398,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
>  		goto exit_free_device;
>  	}
>  
> -	dev_info(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
> -		 KBUILD_MODNAME, priv->base, dev->irq);
> +	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
> +		 KBUILD_MODNAME, dev->irq);
>  	return 0;
>  
>  exit_free_device:
> diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c
> index bb7224cfc6ab..4ebac0312a18 100644
> --- a/drivers/net/can/cc770/cc770.c
> +++ b/drivers/net/can/cc770/cc770.c
> @@ -300,8 +300,7 @@ static int cc770_probe_chip(struct net_device *dev)
>  	 * is no chip in this address space
>  	 */
>  	if (cc770_read_reg(priv, cpu_interface) & CPUIF_RST) {
> -		netdev_info(dev, "probing @0x%p failed (reset)\n",
> -			    priv->reg_base);
> +		netdev_info(dev, "probing failed (reset)\n");
>  		return -ENODEV;
>  	}
>  
> @@ -312,8 +311,7 @@ static int cc770_probe_chip(struct net_device *dev)
>  	if ((cc770_read_reg(priv, msgobj[1].data[1]) != 0x25) ||
>  	    (cc770_read_reg(priv, msgobj[2].data[3]) != 0x52) ||
>  	    (cc770_read_reg(priv, msgobj[10].data[6]) != 0xc3)) {
> -		netdev_info(dev, "probing @0x%p failed (pattern)\n",
> -			    priv->reg_base);
> +		netdev_info(dev, "probing failed (pattern)\n");
>  		return -ENODEV;
>  	}
>  
> diff --git a/drivers/net/can/cc770/cc770_isa.c b/drivers/net/can/cc770/cc770_isa.c
> index 194c86e0f340..372de4d18a7f 100644
> --- a/drivers/net/can/cc770/cc770_isa.c
> +++ b/drivers/net/can/cc770/cc770_isa.c
> @@ -267,8 +267,7 @@ static int cc770_isa_probe(struct platform_device *pdev)
>  		goto exit_unmap;
>  	}
>  
> -	dev_info(&pdev->dev, "device registered (reg_base=0x%p, irq=%d)\n",
> -		 priv->reg_base, dev->irq);
> +	dev_info(&pdev->dev, "device registered (irq=%d)\n", dev->irq);
>  	return 0;
>  
>   exit_unmap:
> diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
> index 8d916e2ee6c2..2049921eed89 100644
> --- a/drivers/net/can/cc770/cc770_platform.c
> +++ b/drivers/net/can/cc770/cc770_platform.c
> @@ -203,9 +203,9 @@ static int cc770_platform_probe(struct platform_device *pdev)
>  		goto exit_free_cc770;
>  
>  	dev_dbg(&pdev->dev,
> -		 "reg_base=0x%p irq=%d clock=%d cpu_interface=0x%02x "
> +		 "irq=%d clock=%d cpu_interface=0x%02x "
>  		 "bus_config=0x%02x clkout=0x%02x\n",
> -		 priv->reg_base, dev->irq, priv->can.clock.freq,
> +		 dev->irq, priv->can.clock.freq,
>  		 priv->cpu_interface, priv->bus_config, priv->clkout);
>  
>  	platform_set_drvdata(pdev, dev);
> diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
> index d0c5a7a60daf..80e1485675a9 100644
> --- a/drivers/net/can/grcan.c
> +++ b/drivers/net/can/grcan.c
> @@ -1616,8 +1616,8 @@ static int grcan_setup_netdev(struct platform_device *ofdev,
>  	netif_napi_add(dev, &priv->napi, grcan_poll, GRCAN_NAPI_WEIGHT);
>  
>  	SET_NETDEV_DEV(dev, &ofdev->dev);
> -	dev_info(&ofdev->dev, "regs=0x%p, irq=%d, clock=%d\n",
> -		 priv->regs, dev->irq, priv->can.clock.freq);
> +	dev_info(&ofdev->dev, "irq=%d, clock=%d\n",
> +		 dev->irq, priv->can.clock.freq);
>  
>  	err = register_candev(dev);
>  	if (err)
> diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
> index b0a3473f211d..82aeac04ad89 100644
> --- a/drivers/net/can/ifi_canfd/ifi_canfd.c
> +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
> @@ -1006,8 +1006,8 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
>  
>  	devm_can_led_init(ndev);
>  
> -	dev_info(dev, "Driver registered: regs=%p, irq=%d, clock=%d\n",
> -		 priv->base, ndev->irq, priv->can.clock.freq);
> +	dev_info(dev, "Driver registered: irq=%d, clock=%d\n",
> +		 ndev->irq, priv->can.clock.freq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
> index de4ddf79ba9b..3d577489b5fb 100644
> --- a/drivers/net/can/mscan/mpc5xxx_can.c
> +++ b/drivers/net/can/mscan/mpc5xxx_can.c
> @@ -330,8 +330,8 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
>  		goto exit_free_mscan;
>  	}
>  
> -	dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
> -		 priv->reg_base, dev->irq, priv->can.clock.freq);
> +	dev_info(&ofdev->dev, "MSCAN at irq %d, clock %d Hz\n",
> +		 dev->irq, priv->can.clock.freq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/peak_canfd/peak_pciefd_main.c b/drivers/net/can/peak_canfd/peak_pciefd_main.c
> index 1df3c4b54f03..be483b82c314 100644
> --- a/drivers/net/can/peak_canfd/peak_pciefd_main.c
> +++ b/drivers/net/can/peak_canfd/peak_pciefd_main.c
> @@ -678,8 +678,8 @@ static int pciefd_can_probe(struct pciefd_board *pciefd)
>  	/* save the object address in the board structure */
>  	pciefd->can[pciefd->can_count] = priv;
>  
> -	dev_info(&pciefd->pci_dev->dev, "%s at reg_base=0x%p irq=%d\n",
> -		 ndev->name, priv->reg_base, ndev->irq);
> +	dev_info(&pciefd->pci_dev->dev, "%s at irq=%d\n",
> +		 ndev->name, pciefd->pci_dev->irq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
> index 4ab91759a5c6..cab01076f60f 100644
> --- a/drivers/net/can/sja1000/ems_pci.c
> +++ b/drivers/net/can/sja1000/ems_pci.c
> @@ -333,8 +333,8 @@ static int ems_pci_add_card(struct pci_dev *pdev,
>  
>  			card->channels++;
>  
> -			dev_info(&pdev->dev, "Channel #%d at 0x%p, irq %d\n",
> -					i + 1, priv->reg_base, dev->irq);
> +			dev_info(&pdev->dev, "Channel #%d, irq %d\n",
> +					i + 1, dev->irq);
>  		} else {
>  			free_sja1000dev(dev);
>  		}
> diff --git a/drivers/net/can/sja1000/ems_pcmcia.c b/drivers/net/can/sja1000/ems_pcmcia.c
> index 4642b6d4aaf7..4f267566edbb 100644
> --- a/drivers/net/can/sja1000/ems_pcmcia.c
> +++ b/drivers/net/can/sja1000/ems_pcmcia.c
> @@ -228,8 +228,8 @@ static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)
>  			card->channels++;
>  
>  			printk(KERN_INFO "%s: registered %s on channel "
> -			       "#%d at 0x%p, irq %d\n", DRV_NAME, dev->name,
> -			       i, priv->reg_base, dev->irq);
> +			       "#%d, irq %d\n", DRV_NAME, dev->name,
> +			       i, dev->irq);
>  		} else
>  			free_sja1000dev(dev);
>  	}
> diff --git a/drivers/net/can/sja1000/f81601.c b/drivers/net/can/sja1000/f81601.c
> index 8f25e95814ef..8e2ba36866fe 100644
> --- a/drivers/net/can/sja1000/f81601.c
> +++ b/drivers/net/can/sja1000/f81601.c
> @@ -184,8 +184,8 @@ static int f81601_pci_probe(struct pci_dev *pdev,
>  		}
>  
>  		card->net_dev[i] = dev;
> -		dev_info(&pdev->dev, "Channel #%d, %s at 0x%p, irq %d\n", i,
> -			 dev->name, priv->reg_base, dev->irq);
> +		dev_info(&pdev->dev, "Channel #%d, %s, irq %d\n", i,
> +			 dev->name, dev->irq);
>  	}
>  
>  	return 0;
> diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c
> index 95fe9ee1ce32..b9371579acd2 100644
> --- a/drivers/net/can/sja1000/kvaser_pci.c
> +++ b/drivers/net/can/sja1000/kvaser_pci.c
> @@ -251,8 +251,7 @@ static int kvaser_pci_add_chan(struct pci_dev *pdev, int channel,
>  	priv->irq_flags = IRQF_SHARED;
>  	dev->irq = pdev->irq;
>  
> -	dev_info(&pdev->dev, "reg_base=%p conf_addr=%p irq=%d\n",
> -		 priv->reg_base, board->conf_addr, dev->irq);
> +	dev_info(&pdev->dev, "irq=%d\n", dev->irq);
>  
>  	SET_NETDEV_DEV(dev, &pdev->dev);
>  	dev->dev_id = channel;
> diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
> index 84f34020aafb..71e84e2f9773 100644
> --- a/drivers/net/can/sja1000/peak_pci.c
> +++ b/drivers/net/can/sja1000/peak_pci.c
> @@ -686,9 +686,7 @@ static int peak_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  			goto failure_free_dev;
>  		}
>  
> -		dev_info(&pdev->dev,
> -			 "%s at reg_base=0x%p cfg_base=0x%p irq=%d\n",
> -			 dev->name, priv->reg_base, chan->cfg_base, dev->irq);
> +		dev_info(&pdev->dev, "%s at irq=%d\n", dev->name, dev->irq);
>  	}
>  
>  	/* Enable interrupts */
> diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
> index 131a084c3535..743780947c0b 100644
> --- a/drivers/net/can/sja1000/peak_pcmcia.c
> +++ b/drivers/net/can/sja1000/peak_pcmcia.c
> @@ -580,8 +580,8 @@ static int pcan_add_channels(struct pcan_pccard *card)
>  		ccr &= ~PCC_CCR_LED_OFF_CHAN(i);
>  
>  		dev_info(&pdev->dev,
> -			"%s on channel %d at 0x%p irq %d\n",
> -			netdev->name, i, priv->reg_base, pdev->irq);
> +			"%s on channel %d at irq %d\n",
> +			netdev->name, i, pdev->irq);
>  	}
>  
>  	/* write new ccr (change leds state) */
> diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
> index 5de1ebb0c6f0..568e2efed76f 100644
> --- a/drivers/net/can/sja1000/plx_pci.c
> +++ b/drivers/net/can/sja1000/plx_pci.c
> @@ -704,8 +704,8 @@ static int plx_pci_add_card(struct pci_dev *pdev,
>  
>  			card->channels++;
>  
> -			dev_info(&pdev->dev, "Channel #%d at 0x%p, irq %d "
> -				 "registered as %s\n", i + 1, priv->reg_base,
> +			dev_info(&pdev->dev, "Channel #%d at irq %d "
> +				 "registered as %s\n", i + 1,
>  				 dev->irq, dev->name);
>  		} else {
>  			dev_err(&pdev->dev, "Channel #%d not detected\n",
> diff --git a/drivers/net/can/sja1000/sja1000_isa.c b/drivers/net/can/sja1000/sja1000_isa.c
> index d513fac50718..9fe0f3d72d9f 100644
> --- a/drivers/net/can/sja1000/sja1000_isa.c
> +++ b/drivers/net/can/sja1000/sja1000_isa.c
> @@ -205,8 +205,8 @@ static int sja1000_isa_probe(struct platform_device *pdev)
>  		goto exit_unmap;
>  	}
>  
> -	dev_info(&pdev->dev, "%s device registered (reg_base=0x%p, irq=%d)\n",
> -		 DRV_NAME, priv->reg_base, dev->irq);
> +	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
> +		 DRV_NAME, dev->irq);
>  	return 0;
>  
>   exit_unmap:
> diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c
> index f9ec7bd8dfac..ff99fe711d0b 100644
> --- a/drivers/net/can/sja1000/sja1000_platform.c
> +++ b/drivers/net/can/sja1000/sja1000_platform.c
> @@ -288,8 +288,8 @@ static int sp_probe(struct platform_device *pdev)
>  		goto exit_free;
>  	}
>  
> -	dev_info(&pdev->dev, "%s device registered (reg_base=%p, irq=%d)\n",
> -		 DRV_NAME, priv->reg_base, dev->irq);
> +	dev_info(&pdev->dev, "%s device registered (irq=%d)\n",
> +		 DRV_NAME, dev->irq);
>  	return 0;
>  
>   exit_free:
> diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
> index 25d6d81ab4f4..04f93c2f8eca 100644
> --- a/drivers/net/can/sun4i_can.c
> +++ b/drivers/net/can/sun4i_can.c
> @@ -885,8 +885,8 @@ static int sun4ican_probe(struct platform_device *pdev)
>  	}
>  	devm_can_led_init(dev);
>  
> -	dev_info(&pdev->dev, "device registered (base=%p, irq=%d)\n",
> -		 priv->base, dev->irq);
> +	dev_info(&pdev->dev, "device registered (irq=%d)\n",
> +		 dev->irq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
> index ff31b993ab17..fbb0b7b7c16e 100644
> --- a/drivers/net/can/ti_hecc.c
> +++ b/drivers/net/can/ti_hecc.c
> @@ -956,8 +956,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
>  
>  	devm_can_led_init(ndev);
>  
> -	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%u)\n",
> -		 priv->base, (u32)ndev->irq);
> +	dev_info(&pdev->dev, "device registered (irq=%u)\n", (u32)ndev->irq);
>  
>  	return 0;
>  
> diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
> index 1674b561c9a2..2c5a030c29e7 100644
> --- a/drivers/net/can/xilinx_can.c
> +++ b/drivers/net/can/xilinx_can.c
> @@ -1820,8 +1820,8 @@ static int xcan_probe(struct platform_device *pdev)
>  		priv->write_reg(priv, XCAN_AFR_2_MASK_OFFSET, 0x00000000);
>  	}
>  
> -	netdev_dbg(ndev, "reg_base=0x%p irq=%d clock=%d, tx buffers: actual %d, using %d\n",
> -		   priv->reg_base, ndev->irq, priv->can.clock.freq,
> +	netdev_dbg(ndev, "irq=%d clock=%d, tx buffers: actual %d, using %d\n",
> +		   ndev->irq, priv->can.clock.freq,
>  		   hw_tx_max, priv->tx_max);
>  
>  	return 0;
> -- 
> 2.34.1
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH 3/9] dt-binding: can: m_can: include common CAN controller bindings
  2022-01-24 21:56 ` [PATCH 3/9] dt-binding: can: m_can: " Marc Kleine-Budde
@ 2022-02-17 16:05   ` Chandrasekar R
  2022-02-17 20:17     ` Marc Kleine-Budde
  0 siblings, 1 reply; 13+ messages in thread
From: Chandrasekar R @ 2022-02-17 16:05 UTC (permalink / raw)
  To: 'Marc Kleine-Budde', linux-can; +Cc: 'Rob Herring', devicetree

Ccing Rob Herring and devicetree mailing list.

> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: 25 January 2022 03:27
> To: linux-can@vger.kernel.org
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>; Chandrasekar Ramakrishnan
> <rcsekar@samsung.com>
> Subject: [PATCH 3/9] dt-binding: can: m_can: include common CAN controller
> bindings
> 
> Since commit
> 
> | 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")
> 
> there is a common CAN controller binding. Add this to the m_can binding.
> 
> Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com>

>  Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> index fb547e26c676..710880dc7594 100644
> --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> @@ -11,6 +11,9 @@ description: Bosch MCAN controller for CAN bus
>  maintainers:
>    - Sriram Dash <sriram.dash@samsung.com>
> 
> +allOf:
> +  - $ref: can-controller.yaml#
> +
>  properties:
>    compatible:
>      const: bosch,m_can
> --
> 2.34.1
> 
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/9] dt-binding: can: m_can: include common CAN controller bindings
  2022-02-17 16:05   ` Chandrasekar R
@ 2022-02-17 20:17     ` Marc Kleine-Budde
  0 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2022-02-17 20:17 UTC (permalink / raw)
  To: Chandrasekar R; +Cc: linux-can, 'Rob Herring', devicetree

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

On 17.02.2022 21:35:22, Chandrasekar R wrote:
> > -----Original Message-----
> > From: Marc Kleine-Budde <mkl@pengutronix.de>
> > Sent: 25 January 2022 03:27
> > To: linux-can@vger.kernel.org
> > Cc: Marc Kleine-Budde <mkl@pengutronix.de>; Chandrasekar Ramakrishnan
> > <rcsekar@samsung.com>
> > Subject: [PATCH 3/9] dt-binding: can: m_can: include common CAN controller
> > bindings
> > 
> > Since commit
> > 
> > | 1f9234401ce0 ("dt-bindings: can: add can-controller.yaml")
> > 
> > there is a common CAN controller binding. Add this to the m_can binding.
> > 
> > Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > ---
> Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com>

Thanks for you review.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-02-17 20:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 2/9] dt-binding: can: sun4i_can: " Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 3/9] dt-binding: can: m_can: " Marc Kleine-Budde
2022-02-17 16:05   ` Chandrasekar R
2022-02-17 20:17     ` Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 4/9] dt-binding: can: rcar-can: " Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 5/9] can: bittiming: can_validate_bitrate(): simplify bit rate checking Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 6/9] can: bittiming: mark function arguments and local variables as const Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 7/9] can: drivers: don't print IO remapped address of base registers Marc Kleine-Budde
2022-01-25  8:48   ` Alexandre Belloni
2022-01-24 21:56 ` [PATCH 8/9] can: kvaser_usb: kvaser_usb_send_cmd(): remove redundant variable actual_len Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 9/9] can: c_can: ethtool: use default drvinfo Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).