Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1220294lqh; Mon, 6 May 2024 00:07:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV9ANYer5P5HDjRQgj/944dVLZvQI06jk8qd9rhSip63MRz8LKTQbBBWsfhFgG4qzZeGD/7qI3s3jNpWhIDi5LZG3FmhU9DcDIkgNsGA== X-Google-Smtp-Source: AGHT+IGVDkwhM1dhAgTMuWjw2MzulDMRl86lRAmMmRJ2G1oRtbGcRt7T6dKt51BOdCux1xdopJlb X-Received: by 2002:a17:907:7f88:b0:a59:c52b:9936 with SMTP id qk8-20020a1709077f8800b00a59c52b9936mr2529921ejc.26.1714979270847; Mon, 06 May 2024 00:07:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714979270; cv=pass; d=google.com; s=arc-20160816; b=0LSSDiks+8+eqYsySsTAaL41MkZiKPyiHH0f9y8ePeY3RM/XLty7f5xE2qZQjpArZc Qmh7XRzo5trOirpYz3h8ASiOWmQHc+6lork+9sdUEk6BGRDSYZnDGCM3D5HSsN6Ze9vI b3MlCRG+x2iVqgJqkJjjUTfPyW0igmKHElJvclBKm1IqbmYaz6LKIkUiVrGiq1qKs38E bX7wWQVfZpM/BOGAnIfU7cf/0Yq0b95CJrUYMB+KEQ2UhcaeJsbk+Ez2hlwaJXIpQAUP NQdFZz6St9ZmNqGk6t+yE1Kl161Fb82ZrcaZieCj+5wdU5J9BH9oYnGE/2FFDFOhdx5k dP5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=mF3okb/zlCrXIKizMgfKu76xu/b0djUY7d04ZIvQ2SI=; fh=H5HUMH1A8uLq0gSCoK0bwcgiAHAGo2KjINN5jGNfXlM=; b=xLvuYEw12Wow0DRbHR80xXr0bWSY0Mqzi+OQ9bPBpJWA3qsYo7B3S+3oEah+S0ZRzg pRRZ+yC+vhh4VlPh3HVFE50z7QWm4S/FXYPBlIeX5JlumGlK68ivCeIVEdFjrund5wcI 3PsSn8nhJE9X1eOWlPME4ISeBytREL4x3Zovzqwy/qbVkjqEOmv6nHDn44KhAvNoiHWe c0M4wFWae1iT7ye0+kyENbIhEOvRrUE0ms6DoYmkCUVeUif4kQa17fQnYrjOohWvn7IG RuupApRUPMJQw4K/3QXJ1H+ZXBj089X5dtIjkmsV9ZsmiTsncpegOiW2YDUNNOqgVJZF FJXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=j6S2vSVa; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v12-20020a17090606cc00b00a59a07e9eb1si2869690ejb.569.2024.05.06.00.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=j6S2vSVa; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9502E1F20FD1 for ; Mon, 6 May 2024 07:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FD3C12836B; Mon, 6 May 2024 07:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="j6S2vSVa" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90C92481B1; Mon, 6 May 2024 07:07:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714979233; cv=none; b=IOoUWJoZINYDGvp18N/jKzq6cpt4/sbUsoaKVeINlhO3GUotQkwEYC3KaRdywoF8SwaNheP7rcywDVs8pK91r6FvW7iTToP44HvspW75toebdObU219BY6ArW13rmNtzlcEQR5+2E2qmfSb0WpcuzkLdjS71S48lR2x1LnU5ISQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714979233; c=relaxed/simple; bh=/ygl80MN8pFCAtka2vGNeRmQZQPFH5Tx21QOyhP/sdw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=YTBrWNaU/b5DMWIjxKQ0Ne2fWH4AE5S9TlKWny2+qCeLqVv729IITLtH5H4apwKEF5AQomuy0XTK/bPlCEw1rsNlul9z6K1cqEAWvj1Wf+f1F60Rld7IKSjIgwsk6W873nNp8Y084bGZ1k5f1V4p2cjZUEEu+0Fgk/Kxl/YkpMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=j6S2vSVa; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 5B373C0009; Mon, 6 May 2024 07:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1714979223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mF3okb/zlCrXIKizMgfKu76xu/b0djUY7d04ZIvQ2SI=; b=j6S2vSVa12Y36dfV8tSiSbHT3HtfhSkv0miIpTvodL/pMj702HSJQ9y/L1BrzHr+qwLXn6 v2ZyKVzBxVY7xGQtCTXTbWlD8rGppHUFKNmkECKa+Yf1VYBvrBLYTLoG7xuPT0nlDSFKTn tQ7+PrQmjCcsQsxCuGd/N0KUPOwZG5vSd8hklW22nf0kovdubmuVt/SGy/3rbafk+S4FOJ tzr3557EK3oB4tVti3Y4jis6NgO+W+RNz4aJ954fCkd/SayzGMqihFKlpTH/owBuA4AaJk mFHMNUcOPz0toEn0zeYQqJcoHweorazXNAudn8zQUYj+d9aebS6A5a/Z6hztRg== Date: Mon, 6 May 2024 09:07:41 +0200 (CEST) From: Romain Gantois To: Serge Semin cc: Romain Gantois , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , =?ISO-8859-15?Q?Cl=E9ment_L=E9ger?= , Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next v5 2/7] net: stmmac: Add dedicated XPCS cleanup method In-Reply-To: <4wdcmcb2yxneynxtppestl6cp25z5xge3hfv7o47bxwpafn4cg@mtvc3ls2cxij> Message-ID: References: <20240430-rzn1-gmac1-v5-0-62f65a84f418@bootlin.com> <20240430-rzn1-gmac1-v5-2-62f65a84f418@bootlin.com> <4wdcmcb2yxneynxtppestl6cp25z5xge3hfv7o47bxwpafn4cg@mtvc3ls2cxij> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-GND-Sasl: romain.gantois@bootlin.com Hi Serge, On Fri, 3 May 2024, Serge Semin wrote: > > > +void stmmac_pcs_clean(struct stmmac_priv *priv) > > Ideally it would have been great to have the entire driver fixed to > accept the stmmac_priv pointer as the functions argument. But this > would be too tiresome. Anyway seeing the PCS-setup protagonist method > has the net_device pointer passed I would implement the same prototype > for the antagonist even though it would require an additional local > variable. That will make the MDIO and PCS local interface-functions > looking alike and as if unified. That is the reason of why I made > stmmac_xpcs_clean() accepting the net_device pointer. > > Alternatively both stmmac_pcs_setup() and stmmac_pcs_clean() could be > converted to just accepting a pointer to the stmmac_priv instance. I think that adapting stmmac_pcs_clean() to take a net_device struct would be more appropriate since it's the simpler of the two methods. I'll implement this in the next version. Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com