Message ID | 20221210090157.793547-10-mailhol.vincent@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1213618wrr; Sat, 10 Dec 2022 01:14:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf53kCtGl01TNf+9fTYNWjahJBeanUdpJfNnZMBF6wU1nFXer4pYkJDeYm7ouK2x1/KUSWAt X-Received: by 2002:a05:6a21:3299:b0:9d:efbe:52b9 with SMTP id yt25-20020a056a21329900b0009defbe52b9mr15702167pzb.41.1670663663123; Sat, 10 Dec 2022 01:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670663663; cv=none; d=google.com; s=arc-20160816; b=l0vmfh7oWdiU4Hxbr9F69rUkqqVQy8jLf2hSCNBN3dTwwF+jVuMsEKbUk9drMSZY/S q83d+lg4Y8lJ875RmI/iSXdhiJp91iuZROJuHY6Fh8kFw4J9y15LEY4lXt/HdYwmG6Ub wWrW7vM6rr9o3ed4ReAhiJICgjWNsaKa6iQvcAgYtYWQBknbLqMTz0Ls3TZsebcfYEN7 kXSZtLGIqJrzD0XnENZH1iqa3E2mCvJebERuqwEEkky7m51Uosy/pWh6uXpTJik5KtaZ vQ9WD6hmOApQXP9ajEey8FAeQI3lAuERCpfoDvVH7FCBpZX1EysCIlpSnxzguUxYF0s/ jBWg== 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:date:subject:cc:to:from:sender :dkim-signature; bh=BAIDUqCFCbste3E2fgCqiNLLF34YAvsqIts/qVZT5VE=; b=ZZhcjG2+inTNH2RaAVjoTuFOW5tlWE2VGnPJvDp+nbiFurMWbU6bFanyMoZtjR8eID 7Z84wIkihb3dpqr8kXop2S5LKJ8U0iw0BSLTcyzlWzEP0fBrIifmBirs+1gjdWoqKlRK Ty8SwFQE4DXSQmwSrUPS7I/zszFYj1WXTbxt73UwLsOHcgpDZTGClU0p2NPkF9GXINim gpYWWjkKV537bl0lqTLq//L7WujE7V+Af17iuac39IWdSvuNWKPzh3GYxmGqvAcgg9V3 90jX/Jg3ZnMPveEfk3WJj/R9n7R0lg8hkmIm13EePwYuHFUzNceo2O2vju2tRZv3CpsT b8eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KMX9ZOUf; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a17090a3e4c00b0021901063557si4309923pjm.23.2022.12.10.01.14.09; Sat, 10 Dec 2022 01:14:23 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KMX9ZOUf; 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 S229947AbiLJJGv (ORCPT <rfc822;jz.zhangjin@gmail.com> + 99 others); Sat, 10 Dec 2022 04:06:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiLJJFY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 10 Dec 2022 04:05:24 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A1B227FCC; Sat, 10 Dec 2022 01:03:53 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id q17-20020a17090aa01100b002194cba32e9so10662153pjp.1; Sat, 10 Dec 2022 01:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=BAIDUqCFCbste3E2fgCqiNLLF34YAvsqIts/qVZT5VE=; b=KMX9ZOUf4MOtPI3r5RMOVeguRIHaPIyxTnjBz3h5KoXtV0Mi4dAhXXID6SvrMZuL0F wB1cVuDX5UJgsOCnTM0W1RpO2RQc527nxUWn5/cKwb9Oy30pguJqK/ApNxMtraAdDNK9 Q0/R3CfADH4p6YRGoY6dRiKxAehFTZaoRIh5+cpQJdU0kQNGjKL4u1332qT5ZebH+AGe Sn2Obg7ltato8+uWw6CJ962vqH46u7EkVZ06bb9asTkrl2LOCXnZt6HkxUg6rnaAE1Q1 JiGQ2iZZlhMei2Ama4LM0PO8yv4M7QC8Ve/dsg00R9OJvptaFnD4T3LM2hCWYGK0XwmQ cmlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BAIDUqCFCbste3E2fgCqiNLLF34YAvsqIts/qVZT5VE=; b=c0KB1LFFEZoj2AuLpcPdNywJnCdzWOi+Xc78FEyoi2tEYTbV4jERRlzddjp5DJEYFP 0W2pZAzcJcf1q0p76bH2prZcrvCRYuAAQe1UiB0oOL/E/Qcu/3Y5jb+EeuvOUwO3Yq0b OJ1184cLNAFJlJ8jemiu+Je1Ss1+SONBEpMo5yD3A6OMwSOwzaL3YmAkapDcs+oTvAZ9 MTnrO/YSaG1br81lhxXivldIWEFL9B2kafDgl5lh6mEdo+3Q3fpt6HcJjLLoitZPC75H dMwvS5+HoEOmIp3hX3hrLl3ZnZvrbEnDvVpgZO2MwbXamaq3HwHeJXYu9z2KgNac2Ggt YSqA== X-Gm-Message-State: ANoB5pmWJkcKciilxaBAr9+jMgUyu+u5zSipO+HoWZG6IoRlL/8CquxN SgDRGEnEjBxNoQQhbOryQhc= X-Received: by 2002:a17:902:be05:b0:186:59e9:a261 with SMTP id r5-20020a170902be0500b0018659e9a261mr8546405pls.43.1670663033101; Sat, 10 Dec 2022 01:03:53 -0800 (PST) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id u7-20020a17090282c700b00186a2444a43sm2549481plz.27.2022.12.10.01.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 01:03:52 -0800 (PST) Sender: Vincent Mailhol <vincent.mailhol@gmail.com> From: Vincent Mailhol <mailhol.vincent@wanadoo.fr> To: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org Cc: Oliver Neukum <oneukum@suse.com>, Wolfgang Grandegger <wg@grandegger.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Frank Jungclaus <frank.jungclaus@esd.eu>, socketcan@esd.eu, Yasushi SHOJI <yashi@spacecubics.com>, =?utf-8?q?Stefan_M=C3=A4tje?= <stefan.maetje@esd.eu>, Hangyu Hua <hbh25y@gmail.com>, Oliver Hartkopp <socketcan@hartkopp.net>, Peter Fink <pfink@christ-es.de>, Jeroen Hofstee <jhofstee@victronenergy.com>, =?utf-8?q?Christoph_M=C3=B6hring?= <cmoehring@christ-es.de>, John Whittington <git@jbrengineering.co.uk>, Vasanth Sadhasivan <vasanth.sadhasivan@samsara.com>, Jimmy Assarsson <extja@kvaser.com>, Anssi Hannula <anssi.hannula@bitwise.fi>, Pavel Skripkin <paskripkin@gmail.com>, Stephane Grosjean <s.grosjean@peak-system.com>, Wolfram Sang <wsa+renesas@sang-engineering.com>, "Gustavo A . R . Silva" <gustavoars@kernel.org>, Julia Lawall <Julia.Lawall@inria.fr>, Dongliang Mu <dzm91@hust.edu.cn>, Sebastian Haas <haas@ems-wuensche.com>, Maximilian Schneider <max@schneidersoft.net>, Daniel Berglund <db@kvaser.com>, Olivier Sobrie <olivier@sobrie.be>, =?utf-8?b?UmVtaWdpdXN6IEtvxYLFgsSFdGFq?= <remigiusz.kollataj@mobica.com>, Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>, Martin Elshuber <martin.elshuber@theobroma-systems.com>, Bernd Krumboeck <b.krumboeck@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>, linux-usb@vger.kernel.org, Vincent Mailhol <mailhol.vincent@wanadoo.fr> Subject: [PATCH v2 9/9] can: etas_es58x and peak_usb: remove useless call to usb_set_intfdata() Date: Sat, 10 Dec 2022 18:01:57 +0900 Message-Id: <20221210090157.793547-10-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221210090157.793547-1-mailhol.vincent@wanadoo.fr> References: <20221203133159.94414-1-mailhol.vincent@wanadoo.fr> <20221210090157.793547-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751200069633423848?= X-GMAIL-MSGID: =?utf-8?q?1751817821053767750?= |
Series |
can: usb: remove all usb_set_intfdata(intf, NULL) in drivers' disconnect()
|
|
Commit Message
Vincent Mailhol
Dec. 10, 2022, 9:01 a.m. UTC
The core sets the usb_interface to NULL in [1]. Also setting it to
NULL in usb_driver::disconnect() is useless.
Remove the call to usb_set_intfdata(intf, NULL) in the disconnect
function of all drivers under drivers/net/can/usb.
[1] function usb_unbind_interface() from drivers/usb/core/driver.c
Link: https://elixir.bootlin.com/linux/v6.0/source/drivers/usb/core/driver.c#L497
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
drivers/net/can/usb/etas_es58x/es58x_core.c | 1 -
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c index 0c7f7505632c..4924f0be3510 100644 --- a/drivers/net/can/usb/etas_es58x/es58x_core.c +++ b/drivers/net/can/usb/etas_es58x/es58x_core.c @@ -2257,7 +2257,6 @@ static void es58x_disconnect(struct usb_interface *intf) es58x_free_netdevs(es58x_dev); es58x_free_urbs(es58x_dev); devlink_free(priv_to_devlink(es58x_dev)); - usb_set_intfdata(intf, NULL); } static struct usb_driver es58x_driver = { diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index 1d996d3320fe..c15200aebfb6 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -974,8 +974,6 @@ static void peak_usb_disconnect(struct usb_interface *intf) free_candev(netdev); dev_info(&intf->dev, "%s removed\n", name); } - - usb_set_intfdata(intf, NULL); } /*