Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp431700iol; Sat, 11 Jun 2022 07:45:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtbKNNiR8/RQk24a0GeR+ZLRKG+va3TJSaLjvWzhq0UHust7VI1+2HfimzHAGuc2Ucg8aK X-Received: by 2002:a17:902:e8d3:b0:163:9146:2241 with SMTP id v19-20020a170902e8d300b0016391462241mr48981545plg.93.1654958702601; Sat, 11 Jun 2022 07:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654958702; cv=none; d=google.com; s=arc-20160816; b=nMD2GywapoM+GYBeizC5pL365Q/+SF7ipNt1SgUlr6+9lc+unmCQLwfUNMvPWpKV4j xzQeW6rklauxs4f4rbUVeDbD4NrO6wiKC3FZObFn9QTul232T0mnzJuaiLdos94d1Zfw qzCNTrnUElGSZXbo4Lq5otICn5SSWu7xagSYl9iGeZU6okqHEOgdK/Pdj2zf9c9qgVcQ xGnZ8vXNI9rgN3zB6wVkP+4x1G5by9TAqnkzrCfLEUdpxl3NUsdWo5k3dKaxevRU7EB6 Mb4rIrPhXTgeO3+W4LL8LYJb7yesHwDam7at7ij2kk0nOP1P18Gji1Xizfty91zB5CEz uubQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=T8pkU70IRkZ8kMMb9VCR7Nn33ka4AZFgDKTSTTTV2WU=; b=YkWLAVqTMLkYsp3D5Cfu6rhJA0U/hhsP3VDDZ41i5vUUH82FoVB8oXJnzBS4ent0ka 3bbS491Pr+pKizNArOjB8xEaZu8u2FqWnLKZAr56cAVf+P5KKhesXOgyl1p+Vw0jlr3K PiyfkliUV6y4HcqvPH56dIChhAX0hoJIVlsg15TI91SGEA4JLhxHGBneGfHO+ZsNMakC OgWDZ80jwQ+iT73egNquYrZYbuGMqZmAOnTBDQB0mWNFcPy5HF5huXqGu+KwKWanwnps w2nrE6imtAp+opZyu+V1CHqLvA2R/rlL1TGbCLSXWvZZfP19gn0pkv3b1ApB3rkYAUAK E9LQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a631e47000000b003db0f2baa25si2699579pgm.90.2022.06.11.07.44.50; Sat, 11 Jun 2022 07:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233994AbiFKORT (ORCPT + 99 others); Sat, 11 Jun 2022 10:17:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbiFKORS (ORCPT ); Sat, 11 Jun 2022 10:17:18 -0400 Received: from mail.enpas.org (zhong.enpas.org [IPv6:2a03:4000:2:537::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D985B10FF0; Sat, 11 Jun 2022 07:17:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id 5B891100022; Sat, 11 Jun 2022 14:17:15 +0000 (UTC) Date: Sat, 11 Jun 2022 16:17:13 +0200 From: Max Staudt To: Marc Kleine-Budde Cc: Vincent Mailhol , Wolfgang Grandegger , linux-can@vger.kernel.org, Greg Kroah-Hartman , Oliver Neukum , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7] can, tty: can327 CAN/ldisc driver for ELM327 based OBD-II adapters Message-ID: <20220611161713.5303549d.max@enpas.org> In-Reply-To: <20220611133608.3zdfb3nnl5445kr7@pengutronix.de> References: <20220602213544.68273-1-max@enpas.org> <20220611151551.5024f51e.max@enpas.org> <20220611133608.3zdfb3nnl5445kr7@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 11 Jun 2022 15:36:08 +0200 Marc Kleine-Budde 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