[PATCH] Documentation/networking: Fix basic node example document ISO 15765-2

Reyders Morales posted 1 patch 10 months, 2 weeks ago
Documentation/networking/iso15765-2.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] Documentation/networking: Fix basic node example document ISO 15765-2
Posted by Reyders Morales 10 months, 2 weeks ago
In the current struct sockaddr_can tp is member of can_addr.
tp is not member of struct sockaddr_can.

Signed-off-by: Reyders Morales <reyders1@gmail.com>
---
 Documentation/networking/iso15765-2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/iso15765-2.rst b/Documentation/networking/iso15765-2.rst
index 0e9d96074178..37ebb2c417cb 100644
--- a/Documentation/networking/iso15765-2.rst
+++ b/Documentation/networking/iso15765-2.rst
@@ -369,8 +369,8 @@ to their default.
 
   addr.can_family = AF_CAN;
   addr.can_ifindex = if_nametoindex("can0");
-  addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
-  addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
+  addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
+  addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
 
   ret = bind(s, (struct sockaddr *)&addr, sizeof(addr));
   if (ret < 0)
-- 
2.43.0
Re: [PATCH] Documentation/networking: Fix basic node example document ISO 15765-2
Posted by Marc Kleine-Budde 10 months, 2 weeks ago
On 03.02.2025 23:47:20, Reyders Morales wrote:
> In the current struct sockaddr_can tp is member of can_addr.
> tp is not member of struct sockaddr_can.
> 
> Signed-off-by: Reyders Morales <reyders1@gmail.com>

Applied to linux-can.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |
Re: [PATCH] Documentation/networking: Fix basic node example document ISO 15765-2
Posted by Simon Horman 10 months, 2 weeks ago
On Mon, Feb 03, 2025 at 11:47:20PM +0100, Reyders Morales wrote:
> In the current struct sockaddr_can tp is member of can_addr.
> tp is not member of struct sockaddr_can.
> 
> Signed-off-by: Reyders Morales <reyders1@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Re: [PATCH] Documentation/networking: Fix basic node example document ISO 15765-2
Posted by Oliver Hartkopp 10 months, 2 weeks ago

On 03.02.25 23:47, Reyders Morales wrote:
> In the current struct sockaddr_can tp is member of can_addr.
> tp is not member of struct sockaddr_can.
> 
> Signed-off-by: Reyders Morales <reyders1@gmail.com>

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>

Thanks!

> ---
>   Documentation/networking/iso15765-2.rst | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/networking/iso15765-2.rst b/Documentation/networking/iso15765-2.rst
> index 0e9d96074178..37ebb2c417cb 100644
> --- a/Documentation/networking/iso15765-2.rst
> +++ b/Documentation/networking/iso15765-2.rst
> @@ -369,8 +369,8 @@ to their default.
>   
>     addr.can_family = AF_CAN;
>     addr.can_ifindex = if_nametoindex("can0");
> -  addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
> -  addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
> +  addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
> +  addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
>   
>     ret = bind(s, (struct sockaddr *)&addr, sizeof(addr));
>     if (ret < 0)