From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796120718; b=5cQ74WamZ1Qt7X5hh9M9jN1rDfXaAzQyQOkkxYSZTcKf4KpQs5/ZezOy50m53t3NBNC4 QqiPxvv0gxjXc1IKw+GyUAU4CO6b7/yqLiXwf8vvgd0KVbHaRyhtUGkVbu6DkPjIRUX5u hSMgk9v89uIHFRoMLGvJvErcAne9/vDNVQfs7nwHgm/zfkBm34RecOxq+8EuWq/51Bg7M DdUoygh8ayiCuD4mcVjCZIMj39LeCKHc9IWthVSewtG/MybVMPtXxCclPNDTBKLJOgVUW DtxJ9Rb6vuxh9k1QPduCDz79jrzvTrIU6PokSv8LutDUGi2upvFt0ZHjqvM42cvGafA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120718; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Mime-Version: Content-Transfer-Encoding:Content-Type:Date:Message-Id:To:From: Subject:Cc:X-Mailer:References:In-Reply-To: X-Last-TLS-Session-Version; bh=0QWc/kxI5ZEnpITQ7yUxT58ej5tIlM1ZxMp7R5oTW/g=; b=kos5VEG1C5G+RtO35vVwBvnArc5tRPtZTasFw846sY2nWUFDy2QFnRZ3vEA0uaE9LLgA NG3Um9ey6reuMDN6M1RZJ23wdwCs9DaPIb3oJRj4+4v75EcccQKpik6PBOZmgYoI0RNoU JdOhNfW/75EjKaaV6Ep/grcTA/7Y/6Cyxoslpf5WnNa42isceuDeepuTbg65kxdELYgfk nWTUH4tKopxVzH90ISeMO5mmsyZqwpvWr3HMei85av6tJ9LvafSfEW12yiA4G78cejDk4 mRAo4CVELLOMMKBSW0AqWJwOaRuCyA8tbUOEzRARSj51wCCq3vrV6KucOHgC1Oulm7Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=0fpyULsK; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A9A3606A68A for ; Tue, 1 Dec 2026 10:25:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9A9A3606A68A 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=0fpyULsK Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 24BDFC2B9CB; Tue, 1 Dec 2026 10:25:26 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A1DDA603CB; Tue, 1 Dec 2026 10:25:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A90FD11EA134A; Tue, 01 Dec 2026 11:25:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796120710; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=0QWc/kxI5ZEnpITQ7yUxT58ej5tIlM1ZxMp7R5oTW/g=; b=0fpyULsKukb49+HsXMpEK7+r/IZ3lqzqEoYG+cUq2z0ByqI3zPfH0Jv1fZAXmNkuaC+US4 okUv5iVrHu4vxsVGbKU1TtvrK4YQ/Nb4u0b7plhIxX/9nzhB6y7mnC2QTxc3ccfqo/E8Xu 4bbNq1edpTKi0RtxiW6zRY3SSb8ObiwvLeaZ//BC28o2bihkDkfLOfSMvepEJeVJwHYoAX +1bjnXuUAlGiXCbh+W0R/bqTmE7L5ECRJ6IcTqjTukskZmAO2iw+Uq7VqXAHnHSW04WtaU +0XyhpQAnBBlgUAg4jEM7CZbty4RCx+uMilYe87+UtK33ak+Bi6MN9zUvr9f+w== X-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 01 Dec 2026 11:25:06 +0100 Message-Id: To: "Ian Rogers" , "Vinod Koul" From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH 04/10] phy: eyeq5-eth: Set .owner = THIS_MODULE Cc: "Neil Armstrong" , "Manivannan Sadhasivam" , "Nathan Chancellor" , , , , "Vladimir Kondratiev" , =?utf-8?q?Beno=C3=AEt_Monin?= , "Gregory CLEMENT" , "Vladimir Oltean" , "Luca Ceresoli" , X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261130225428.99361-1-irogers@google.com> <20261130225428.99361-5-irogers@google.com> In-Reply-To: <20261130225428.99361-5-irogers@google.com> X-Last-TLS-Session-Version: TLSv1.3 Hello Ian, On Mon Nov 30, 2026 at 11:54 PM CET, Ian Rogers wrote: > phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin > the PHY provider module while the PHY is in use, and of_phy_put() calls > module_put(phy->ops->owner). Because phy->ops is const struct phy_ops *, > phy_create() cannot populate ops->owner at runtime, and > try_module_get(NULL) returns true without incrementing the module > reference count. > > Set .owner =3D THIS_MODULE in eq5_phy_ops, found with Clang's > require_explicit_initialization attribute. > > Fixes: b6e33443876d ("phy: Add driver for EyeQ5 Ethernet PHY wrapper") > Signed-off-by: Ian Rogers > --- > drivers/phy/phy-eyeq5-eth.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/phy/phy-eyeq5-eth.c b/drivers/phy/phy-eyeq5-eth.c > index fae147268f5f..69c428a867c8 100644 > --- a/drivers/phy/phy-eyeq5-eth.c > +++ b/drivers/phy/phy-eyeq5-eth.c > @@ -182,6 +182,7 @@ static const struct phy_ops eq5_phy_ops =3D { > .power_off =3D eq5_phy_power_off, > .set_mode =3D eq5_phy_set_mode, > .validate =3D eq5_phy_validate, > + .owner =3D THIS_MODULE, > }; > =20 > static struct phy *eq5_phy_xlate(struct device *dev, Reviewed-by: Th=C3=A9o Lebrun Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com