lkml.org 
[lkml]   [2022]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7] can, tty: can327 CAN/ldisc driver for ELM327 based OBD-II adapters
On Sat, 11 Jun 2022 15:36:08 +0200
Marc Kleine-Budde <mkl@pengutronix.de> wrote:

> What about this change?
>
> diff --git a/drivers/net/can/dev/netlink.c
> b/drivers/net/can/dev/netlink.c index 7633d98e3912..667ddd28fcdc
> 100644 --- a/drivers/net/can/dev/netlink.c
> +++ b/drivers/net/can/dev/netlink.c
> @@ -176,7 +176,8 @@ static int can_changelink(struct net_device *dev,
> struct nlattr *tb[],
> * directly via do_set_bitrate(). Bail out if neither
> * is given.
> */
> - if (!priv->bittiming_const && !priv->do_set_bittiming)
> + if (!priv->bittiming_const && !priv->do_set_bittiming
> &&
> + !priv->bitrate_const)
> return -EOPNOTSUPP;
>
> memcpy(&bt, nla_data(data[IFLA_CAN_BITTIMING]),
> sizeof(bt));
>
> If it works I'll make a patch and apply it to net-next/master so that
> you can base your series on this.

Yes, it seems to work fine, since the dummy function is empty, and it's
only ever used in this same function, and the pointer is guarded as
Vincent mentioned. So if a no-op do_set_bittiming() is okay, then not
having it at all is also okay.

Yes, I'd appreciate you patching this, and I'll rebase upon it :)


Thanks for your quick decision!

Max

\
 
 \ /
  Last update: 2022-06-11 16:19    [W:0.047 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site