From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Max Staudt <max@enpas.org>
Cc: Vincent Mailhol <vincent.mailhol@gmail.com>,
Wolfgang Grandegger <wg@grandegger.com>,
linux-can@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Oliver Neukum <oneukum@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7] can, tty: can327 CAN/ldisc driver for ELM327 based OBD-II adapters
Date: Sat, 11 Jun 2022 16:20:54 +0200 [thread overview]
Message-ID: <20220611142054.qdn6if6tpw4j3ztq@pengutronix.de> (raw)
In-Reply-To: <20220611161713.5303549d.max@enpas.org>
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
On 11.06.2022 16:17:13, Max Staudt wrote:
> 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.
Having a no-op do_set_bittiming() just to make can_changelink() happy is
not intended. :D
> Yes, I'd appreciate you patching this, and I'll rebase upon it :)
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 --]
next prev parent reply other threads:[~2022-06-11 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 21:35 [PATCH v7] can, tty: can327 CAN/ldisc driver for ELM327 based OBD-II adapters Max Staudt
2022-06-03 15:12 ` Vincent Mailhol
2022-06-03 15:47 ` Vincent Mailhol
2022-06-11 13:16 ` Max Staudt
2022-06-11 13:31 ` Marc Kleine-Budde
2022-06-11 13:15 ` Max Staudt
2022-06-11 13:36 ` Marc Kleine-Budde
2022-06-11 14:17 ` Max Staudt
2022-06-11 14:20 ` Marc Kleine-Budde [this message]
2022-06-11 14:42 ` Vincent Mailhol
2022-06-11 15:28 ` Marc Kleine-Budde
2022-06-11 16:41 ` Max Staudt
2022-06-12 1:33 ` Vincent Mailhol
2022-06-12 12:03 ` Max Staudt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220611142054.qdn6if6tpw4j3ztq@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=max@enpas.org \
--cc=oneukum@suse.com \
--cc=vincent.mailhol@gmail.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).