Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp64078lfe; Fri, 15 Apr 2022 19:41:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySpJ57Jrq9Xzn2WVJVYLxvYG2VNw99VOwUku94hLOl4FZfU+z3vJjClt7CaWWtwzSP3FfO X-Received: by 2002:a05:6a00:23d5:b0:505:dfd4:2f33 with SMTP id g21-20020a056a0023d500b00505dfd42f33mr1652507pfc.59.1650076918581; Fri, 15 Apr 2022 19:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650076918; cv=none; d=google.com; s=arc-20160816; b=n9y0QwcqdKDH/Rb9YO0jMKKpb0Z8RHBOA/3sGGoUuQgTqiA1FnyaYfL/1OlMQquTEB hFiJFw0vt91QQSkGlVlji1w3Z6t/eSM3ngoOxXpRQQ5ERyLELCuZZnIp7lPVT8IRLK77 AJVh9HDghOrvbQK54g6zRxY+H4QskeitqPaGywGkAkGDuXc2kR/8T8NQJU/gdmwGG1ec t8tBSNNmyrOhhv96hRD5nn2/oGNBCwqy183l4hMuTIAT4W21G+JvtLYcVPJUdMG9+eZ+ bgvQ8hHhtsHqP767eItgmECiu1S2kMyixKzqB2JGtZ8tZVqmT172B/OUL3zbr2dMnI8u GCsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=RuMOKVLo+ISZ3SyRd57vI0t4HZmEVbUYhd44dOnPaR8=; b=YIpU0XGc9ZDNeIl+FzpBoPnQuXW2YH5xM4FBE8RVwcDqAfI3Nk/4Jkh3OYg3C99Ddn 7LGu/3zR8IJ7P7+Cj+Kt7eRhSAta2/kuNO05U0Pq7w46haOWIzHOTHHG0AhBzS5kJU1j mldtjp/VkB1JkmAG1fDinJ+remuBXTcR2SomcEWFphIE4lalabjAcE0pjq0vXUqnJksw SiFCdlZ8Kx3ftHRqlDriX8Gy0z5DYjJP5I+68BWvlsLP0udeTghY/wRK+ZRr5HX9nRCT dKY+pcYI7ioxgn1Q8EGz2gAskT5FvmuePZioVlsEpY5sGqqhrFLoDiJmkX18wCo6R8j8 /HMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="s/I9ZQdx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q16-20020a62ae10000000b004fa63c4434fsi2742077pff.322.2022.04.15.19.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="s/I9ZQdx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A6AE918500E; Fri, 15 Apr 2022 18:49:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352417AbiDOLFG (ORCPT + 99 others); Fri, 15 Apr 2022 07:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239380AbiDOLFF (ORCPT ); Fri, 15 Apr 2022 07:05:05 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D701890CFC; Fri, 15 Apr 2022 04:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RuMOKVLo+ISZ3SyRd57vI0t4HZmEVbUYhd44dOnPaR8=; b=s/I9ZQdxvT/lPGV/5ydNBQGv6i 7nufsgBd1oj70q8df9u/sPIBH4Ps5WD75kExEpOlzKPTvPmnTqaYCRTp7Urh0FY+IdglbOBXN8fUn I+3htZWuQucSN7+QcBCTVKDmKOx0tiR1F5pGShF8kt7PPIAPzj0KQxFhUV/ifX0MXOJ41b5YrNpVi Ghcx8z+JDdWha+2nyMHiDw8m36ApnAn7GvqAJAuJxLkevB+HWKBHvVW58EpGvaiWfyOtYkOmVLwoB iH6x5ln3QNptgdA69J25EQvpyWlFuEfF2PMpRUkH+u3dKulWqbrCKlGNNLhpns1n26XPRUYJRordG KsluwS+Q==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58274) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nfJiV-0005Yw-AS; Fri, 15 Apr 2022 12:02:19 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nfJiQ-0005CF-Hk; Fri, 15 Apr 2022 12:02:14 +0100 Date: Fri, 15 Apr 2022 12:02:14 +0100 From: "Russell King (Oracle)" To: Vladimir Oltean Cc: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Heiner Kallweit , Thomas Petazzoni , Herve Codina , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Milan Stevanovic , Jimmy Lalande , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, Jean-Pierre Geslin , Phil Edworthy Subject: Re: [PATCH net-next 06/12] net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver Message-ID: References: <20220414122250.158113-1-clement.leger@bootlin.com> <20220414122250.158113-7-clement.leger@bootlin.com> <20220414144709.tpxiiaiy2hu4n7fd@skbuf> <20220415113453.1a076746@fixe.home> <20220415105503.ztl4zhoyua2qzelt@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220415105503.ztl4zhoyua2qzelt@skbuf> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 01:55:03PM +0300, Vladimir Oltean wrote: > I meant that for a DSA switch driver is mandatory to call dsa_switch_shutdown() > from your ->shutdown method, otherwise subtle things break, sorry for being unclear. > > Please blindly copy-paste the odd pattern that all other DSA drivers use > in ->shutdown and ->remove (with the platform_set_drvdata(dev, NULL) calls), > like a normal person :) Those platform_set_drvdata(, NULL) calls should be killed - the driver model will set the driver data to NULL after ->remove has been called - so having drivers also setting the driver data to NULL is mere duplication. The only case it would matter is if someone is looking up the device and then accessing the driver data - and one would hope that's done with appropriate locking or other guarantees (e.g. driver can never be unbound once the driver data has been set.) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!