Re: [PATCH v2 4/5] can: add netlink interface for CAN-FD Transmitter Delay Compensation (TDC)

From
Marc Kleine-Budde <mkl@pengutronix.de>
Date
2021-03-09 13:20:23
Reply to
Vincent MAILHOL, 2021-03-09
On 09.03.2021 22:16:45, Vincent MAILHOL wrote:
On Wed. 24 Feb 2021 at 09:20, Vincent Mailhol
[off-list ref] wrote:
quoted
diff --git a/drivers/net/can/dev/netlink.c b/drivers/net/can/dev/netlink.c
index c19eef775ec8..c3f75c09d6c8 100644
--- a/drivers/net/can/dev/netlink.c
+++ b/drivers/net/can/dev/netlink.c
@@ -19,6 +19,12 @@ static const struct nla_policy can_policy[IFLA_CAN_MAX + 1] = {
        [IFLA_CAN_DATA_BITTIMING] = { .len = sizeof(struct can_bittiming) },
        [IFLA_CAN_DATA_BITTIMING_CONST] = { .len = sizeof(struct can_bittiming_const) },
        [IFLA_CAN_TERMINATION] = { .type = NLA_U16 },
+       [IFLA_CAN_TDCV] = { .type = NLA_U32 },
+       [IFLA_CAN_TDCV_MAX_CONST] = { .type = NLA_U32 },
+       [IFLA_CAN_TDCO] = { .type = NLA_U32 },
+       [IFLA_CAN_TDCO_MAX_CONST] = { .type = NLA_U32 },
+       [IFLA_CAN_TDCF] = { .type = NLA_U32 },
+       [IFLA_CAN_TDCF_MAX_CONST] = { .type = NLA_U32 },
 };
Looking back at my patch, I just realized that the values are not
ordered in a consistent way. Here, I alternate between the TDCx
and the TDCx_CONST...
quoted
(...)
quoted
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h
index f730d443b918..e69c4b330ae6 100644
--- a/include/uapi/linux/can/netlink.h
+++ b/include/uapi/linux/can/netlink.h
@@ -134,6 +134,12 @@ enum {
        IFLA_CAN_BITRATE_CONST,
        IFLA_CAN_DATA_BITRATE_CONST,
        IFLA_CAN_BITRATE_MAX,
+       IFLA_CAN_TDCV,
+       IFLA_CAN_TDCO,
+       IFLA_CAN_TDCF,
+       IFLA_CAN_TDCV_MAX_CONST,
+       IFLA_CAN_TDCO_MAX_CONST,
+       IFLA_CAN_TDCF_MAX_CONST,
        __IFLA_CAN_MAX
 };
... and there, all the TDCx and the TDCx_CONST are grouped together.

Marc, because the patches are already in the
linux-can-next/testing, how should I proceed to fix this? Should
I resend the full patch series with the changes or can I just
prepare one patch and ask you to squash it?
Please send an incremental patch and I'll squash it.

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 |

Attachments

Thread (19 messages) 19 messages, 3 authors, last reply 2021-06-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help