Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1257392lqh; Mon, 6 May 2024 01:52:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVM1wpMnOeP+vNNDIXistwa/DWDUsThJsJ4aKdcGZnIDs/E5UWZ4FaptuIBCUAmJGj+agsQGW4sK5FyqNADERkufBPmNK+/dobDtcuNfQ== X-Google-Smtp-Source: AGHT+IG2lxHyAzbFEqMiFK8e7WlTO/nKOtdBkfRhMiksRgrarL1BOwF/yEWaJ0yk6dXmV3imc2EM X-Received: by 2002:a9d:74d9:0:b0:6f0:67cf:625c with SMTP id a25-20020a9d74d9000000b006f067cf625cmr1283451otl.9.1714985534256; Mon, 06 May 2024 01:52:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714985534; cv=pass; d=google.com; s=arc-20160816; b=VwSvCIO5Rbi7BMCaN9tg+4tnjhAQP3Lj7xw+/Asy5YHKtZFaoARwCQC4/QpJNenOTv z6Bsq4yjt7u9c0jOEglq2hNFJRj4tV6gVqRtpwZ48I0FqXXQpj98aAR68TYyOXF6AxT/ WZCyiGtTNw6QAVygS81UKpsv6Dp6HETSzDOO6th3NNbJQh6K43dx42Y+L5Hx4VQ3eccC AWblGn4Zj5JyHl+idDDFTPrEpA8VT5Uku1eajrrbV6Kpz8MIbGMgZRZDwv3y9+TS9bnz t733xnUzUR6HGFhYYiSdSCfoHP6HPngx1im0J9cXOFaGZL5P4J79doyoMD3pvqD0ool4 VdnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0W3OM+PzsAuNXqvgrbwYe/sYHFhkCcz6xsmFOfCjwNc=; fh=BHpBaVeEHPJdkrStRNLblF5pwbWlb+JOA2rI7v5Zwzc=; b=bSikf9vjeo2jt8k8X3ULWMYfKmTEZzUnDuUIUrZsxmxKucl9cIOXbPGQIwJl1u12DD WM+xTPQJuVRcyaUiu4egzQ//D5loT4gTJt2LqyGtycrtULbq9WkfoggOREpRyo/z7mg5 fFj1ZpOcI4xtxG7EzehYANkJQeE1PwnNvoYDlGW9PWFkG76IPmf//OWeZLlqLgAyR5Wm w5ofuE4XJms7MXYiI7lNMa/9pBSpiw1CdMrOQG6XXJY/xqjgGUt5CTuqXnma/mEQ64R1 iAO+YAlRYWXjeSR1yaXP2AC42daXD0qvN69RBTS2wrtz4v0K52zhBALPqTd8uLm5qsQl bupw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="SEiBd/u8"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f31-20020a63555f000000b005f803b18ef5si7665537pgm.513.2024.05.06.01.52.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 01:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="SEiBd/u8"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BAC1EB21496 for ; Mon, 6 May 2024 08:51:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 263AD142E64; Mon, 6 May 2024 08:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SEiBd/u8" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7C7A1422AD; Mon, 6 May 2024 08:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714985415; cv=none; b=gDXwMAEmkoB8FqvvLgtVcJutM+fnP+eplXgLSmx62NCNVO/5nToqZZu4bD0lmaYbdj+X9yYTpEUxEZEvud6Oq1oBRyKgikrcbJ1QxQa6AkO1fUWWcnQwjMFfXg0vS+cHPFxosGUUQ0sgjWSf8N2kkJr/GHvvvXnElZYRuUTbDEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714985415; c=relaxed/simple; bh=PVEtpu+l2zGGzojDwX0WQr6+h4fSUImOuCn79HwWJeQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Eb13zwdcPBSHbsf3XdmszaiSH8gN8AcQUdImgbeHmJPzYYh01RF2SLqEBPGqQjx/VxwewL9RmvpqUtjTVh1H8uApuP7T5CRT58tTjlpqUtxT3DAjbT8EIB95ALp6vX6ua/uJaQeC2EywUfXfeAKfF9o1R+TrgklDXAMGxnxRyZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SEiBd/u8; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-51ab4ee9df8so2037841e87.1; Mon, 06 May 2024 01:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714985412; x=1715590212; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0W3OM+PzsAuNXqvgrbwYe/sYHFhkCcz6xsmFOfCjwNc=; b=SEiBd/u8pmlvxUXZjrcU4UPetWt2M6K20xyF312lftD5ydDohCH3IJWKOy86vMk+oG tD0YqAEDYWneIjG6BuQsjQDaIkpDFswSzFTniEcVs+geQL/pHAiS9hGEy6lVVaDzTHXn EHQNYmFxzqWfUkUSM7sRsyVMvAqkmRNryWfqTzRQLVRuJjWsw6a2qKHeAc/ZZHqKSv5j nfTc9PHTo5kLi9vdjV6ac9ttLmgw65TzrLyOb91obntNsxWenT0AbIT+bctGqjwBRJVT 2iLPA5/DXcjVnnXTS0UVrpeGr5d8aO/eSrltmGVUQoXkfv2Dgh9AwTsD9ByEsmSvXgVu yJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714985412; x=1715590212; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0W3OM+PzsAuNXqvgrbwYe/sYHFhkCcz6xsmFOfCjwNc=; b=doCGPtvzn8JY38X1I4I9rE7MygsKTzskocmse4x/akJytCBMjelbfGUETOEgCakget iQ7X8iyjDMZ0+N2fdkzy5q9+gQHjn+kclnqn2qJD1fUsyQsqM2mvlYFrf6BT27WKEP+M C35KJVQ13ZyQ//2Xk2ZFhFTVJ/gqHWmjAWPyzImnDTXT0h1YwQ4H0ggeJpZZoHbzEUFN 3Zc5Gm0JNCXE5w2cxU61ZPdx2YJcOMLukWPhJm5RA7BBzyjer9Cyucy+O3MQq/NViuyo yyD4L3PnGqBdz3RlA81eKT21LWEPDV3XBmcUC0mRizxnhcyska/VYH8bEwpuXmxHuwYd HXNw== X-Forwarded-Encrypted: i=1; AJvYcCVrLuxkIa45W8B1vHYSBuVYKrXfHnHg0qQzYbRqajN2t3rKh38Q8CLmzt+YNFI4kFwwQn9eEvsr2PM46/A71ENqjW/2u1pvO+OGvSyzMOo8HxaE15Xvik6nDEuxzvuUAF0ap/B3kqkXfnjbaFw8Prj41yXw4kWNFJpgUbqq+vQixYBvweanI43NyRJ8WpItKfy9Ju4YovjuQddxgJDmdF/DYZNV X-Gm-Message-State: AOJu0Ywausg1AT+iw7Yt2RQ6ou8txgpoKd+aoqtxHCNK0erB3MCPpDXt bqdUGm/qsvcGWrGoo7zPfJj07wzYe+oatHvWFhWXWE5l4aLcmCB7 X-Received: by 2002:ac2:46e3:0:b0:51d:2a27:9574 with SMTP id q3-20020ac246e3000000b0051d2a279574mr5758742lfo.6.1714985411631; Mon, 06 May 2024 01:50:11 -0700 (PDT) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id y6-20020a0565123f0600b0051e16048adesm1569125lfa.48.2024.05.06.01.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 01:50:11 -0700 (PDT) Date: Mon, 6 May 2024 11:50:08 +0300 From: Serge Semin To: Romain Gantois Cc: "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 , =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , 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 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 Content-Disposition: inline In-Reply-To: On Mon, May 06, 2024 at 09:07:41AM +0200, Romain Gantois wrote: > 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. Awesome! Thanks. -Serge(y) > > Thanks, > > -- > Romain Gantois, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com