Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2556636lqz; Wed, 3 Apr 2024 01:14:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+UrW7Fry4zm5tAVOm37BP5nYIDZCElMLOOoK1x4D7eRS2Bzye4mMiWMLoeTNRN7f9A0j3783cJgEtuT1ghJBMmD77nlSUIAR3LVf+pw== X-Google-Smtp-Source: AGHT+IGXH3ht8uoXWelq8mnRESwlld7aLgXfPe6AOS2vlCKEJeG9y22rfUFmKpgUZa9SpQthERH9 X-Received: by 2002:a05:622a:104:b0:432:f6ec:7a1e with SMTP id u4-20020a05622a010400b00432f6ec7a1emr7245550qtw.21.1712132040824; Wed, 03 Apr 2024 01:14:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712132040; cv=pass; d=google.com; s=arc-20160816; b=KyYJ3OrkMLOJ/D/2VFMNWSHxS7NG/Nxrh0Xbw4uuPS0y9+uvy3+tmQS2fxCzR/zURZ Ur1PoFTtLOSQdMK2CGgBqnUkXnhyHWjC9VIaP1uHn8g/zuwuPglLXz1Bh65YsaY4J4oK 4W3dKBh0Bi+vqUyiMLupC/4YPX8SBZh6RhHjjnnEkOKD2RL7tRMF9n+YO+P9/f2TijGw Z+hk03zn9B0gpHCq1DLGugoPS6pchoE/cj5EbGE47CKOwVeQZUZb9fVUyy7XkNq1QIOx 6HH5tiw3wnpiT6d/W+5QU++UV2c1ZUBD+LaaDWWo4O4hRfAB+oXNCYIA75MqigDB713n G3FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :references:subject:to:from:cc:message-id:date:dkim-signature; bh=XhF6aRBflzsQI/0dvdIY16NcI+/jT9CANrqTXvxS2v8=; fh=qLuIGrWVD1+7hpJcRXkogtzZ2K/mxy8UbbcvF4oYzK0=; b=rLmDLfDD05jWV8aOO6rR/0ZviZkmYF3Ft2gdLobiVBOBZU0DhzCft7NVhAgENM80B2 6UCTfixFEPCRj+mexAO86Co0FRFqUfH2kJUVlMDe7f6Tv5It3HqHVtNasDItRPcquU5v su/VssC0c6nWUa66xuJc9UGcHomm6FtlYJ8CfRPbvAZ05CLSUop24oUnLN+imi9Cv2Rv EwLUXlAb0bU5J0DSyi/ZfhNNfhcG+Wwc5QYihzN5FczL+rdxZsus/7Mi1w1F0P6YJXBS Kel3/WFDGJb70Z/Qo216hogOgRX5jXLL6phTWExSqo/JdxtZYO40PQQi0qV3AWgdmj6R RFkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nmYdqFEB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z3-20020ac87f83000000b00431651420cbsi14010678qtj.755.2024.04.03.01.14.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 01:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nmYdqFEB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 403291C263F5 for ; Wed, 3 Apr 2024 08:12:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5268573513; Wed, 3 Apr 2024 08:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nmYdqFEB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 740EA5FB85; Wed, 3 Apr 2024 08:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131616; cv=none; b=HMSgZ5FxpOyIjTt0uGsN/KARILAu9+CBCklveBiH3fNE3Eqib1cxWDZ8qHlZs5WRmX4uBE82weNklX10dP2SZ2quHGPMsrexLCustnewHMLnD8DN04ABMYoj4g/LKIS7q3xWjyBupVeBvEl4m0NwqVb2ZMZq5IseYsVztAV9yUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131616; c=relaxed/simple; bh=D1fnKXGmnMmng2XJnWn0RD1OcALCWsnaPJw6jX/2oJk=; h=Content-Type:Date:Message-Id:Cc:From:To:Subject:References: In-Reply-To; b=MXwQcbred8r/zC+5pYK2RkHrq05tUbrkoug8Nll+Cv52+vUBqQ1f4oRpOzSEfv5wF/YPV6jBmm4h3Y47ExqQhjJGRNfKzIepqeZ/3zA9u9ek4dAHP9/dEOVXafOxl+AolUsbdzbSwdnJZi0Z9bcn1+aboEuNr5YMvm3XZXub+Fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nmYdqFEB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A036C433F1; Wed, 3 Apr 2024 08:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131615; bh=D1fnKXGmnMmng2XJnWn0RD1OcALCWsnaPJw6jX/2oJk=; h=Date:Cc:From:To:Subject:References:In-Reply-To:From; b=nmYdqFEB6hMbmmMq1HTnQD9AKOwTHn4LdeG9WSL5+bA6ISFiyoReQ48mynf1bfrtm 2cxWDzfq6Kwpw8GDirG4YQfjKe9KXPN3fenEZdrTPLR0RX8tnu5I2qCpjZp0rqR9qA l1NmFCpNYaJo426dTMZF+vqvRLeLqUhe2717vOit18YdAHTHdpTU4O56dacq4W8Cz+ w1AAimDEt1D/jUbc/YXGSz3OCtM8fU7dyfmtiff26M6BgOrILchaYd5HgbVe2vj1Zx 2levQjXnuaDyq7+IL74gDHVRHz1fcFJ7E5HY3oHaaTTOkV/Qw9kb7b/ijgKPY4d9vz IX/6EqidI7a+w== Content-Type: multipart/signed; boundary=4bd2cb084b6d1bc3a4d2b6f2223a5fc8229f83965193b4e69adc10d305a3; micalg=pgp-sha384; protocol="application/pgp-signature" Date: Wed, 03 Apr 2024 10:06:51 +0200 Message-Id: Cc: , , From: "Michael Walle" To: "Christophe JAILLET" , "Vladimir Oltean" , "Andrew Lunn" , "Florian Fainelli" , "David S. Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" Subject: Re: [PATCH net] net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45() X-Mailer: aerc 0.16.0 References: In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: --4bd2cb084b6d1bc3a4d2b6f2223a5fc8229f83965193b4e69adc10d305a3 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Tue Apr 2, 2024 at 8:33 PM CEST, Christophe JAILLET wrote: > The definition and declaration of sja1110_pcs_mdio_write_c45() don't have > parameters in the same order. > > Knowing that sja1110_pcs_mdio_write_c45() is used as a function pointer > in 'sja1105_info' structure with .pcs_mdio_write_c45, and that we have: > > int (*pcs_mdio_write_c45)(struct mii_bus *bus, int phy, int mmd, > int reg, u16 val); > > it is likely that the definition is the one to change. See also "struct mii_bus": /** @write_c45: Perform a C45 write transfer on the bus */ int (*write_c45)(struct mii_bus *bus, int addr, int devnum, int regnum, u16 val); > > Found with cppcheck, funcArgOrderDifferent. > > Fixes: ae271547bba6 ("net: dsa: sja1105: C45 only transactions for PCS") > Signed-off-by: Christophe JAILLET > --- > Compile tested only. > --- > drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/sja1105/sja1105_mdio.c b/drivers/net/dsa/sja= 1105/sja1105_mdio.c > index 833e55e4b961..52ddb4ef259e 100644 > --- a/drivers/net/dsa/sja1105/sja1105_mdio.c > +++ b/drivers/net/dsa/sja1105/sja1105_mdio.c > @@ -94,7 +94,7 @@ int sja1110_pcs_mdio_read_c45(struct mii_bus *bus, int = phy, int mmd, int reg) > return tmp & 0xffff; > } > =20 > -int sja1110_pcs_mdio_write_c45(struct mii_bus *bus, int phy, int reg, in= t mmd, > +int sja1110_pcs_mdio_write_c45(struct mii_bus *bus, int phy, int mmd, in= t reg, > u16 val) Reviewed-by: Michael Walle Vladimir, do you happen to know if some of your boards will use this function? Just wondering because it was never noticed. -michael > { > struct sja1105_mdio_private *mdio_priv =3D bus->priv; --4bd2cb084b6d1bc3a4d2b6f2223a5fc8229f83965193b4e69adc10d305a3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iKgEABMJADAWIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCZg0OHBIcbXdhbGxlQGtl cm5lbC5vcmcACgkQEic87j4CH/hg0wF/RTzwJEa5sk8GegngsX3YXJNsapFGBssA 1yi4ssEWgnZ6MhuJioHlBvvAGMyORvVSAYDbILAPiVw0FfyfNp47+kanvUqhvG78 pxSroqUKdQMTmg56f1PDbdoUyTwYihmBgHw= =ICMO -----END PGP SIGNATURE----- --4bd2cb084b6d1bc3a4d2b6f2223a5fc8229f83965193b4e69adc10d305a3--