From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C2DAA606A325 for ; Mon, 30 Nov 2026 22:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Z+medQr8; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=JjAqxdKE DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=J/fWzTAghBkwTJ3AMSlUGuUhO1CXOLDqbbVPWYwy3PI=; b=Z+medQr8bhguV2vtikO+matoWc ehDYuOxkER/4nbdoAy0qzoZHlcu6sST6RWBS+Rj7ixDtjmCha0t+6nIgojCsLLRoLlDu/P60Gx5Av gc/FUh3wNqUBIZ2K6t2CSgmivlm2dmj3noctGS4hn8SCgyFW/g5jjJ6TAO7bgpLLivn41aDJfqfs6 hyqmyHOQ4qQeqX0HXTtUMWtY+HoyC8lchv93C+jIgh/qNB1e6oMbNGAJVZrKYsFv39hXSGRSuzzml WLJPvKVe7butgyPJjhsiLZAt3g6F+yLDE28t+0VIvFCeE8TmryQxcYa1AtaGQd2ZGDoOPfDrZboe7 a1nwm0OQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAH7-000000060yA-1rkB; Mon, 30 Nov 2026 22:55:09 +0000 Received: from mail-dy1-x1347.google.com ([2607:f8b0:4864:20::1347]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGi-000000060jA-0XEG for linux-phy@lists.infradead.org; Mon, 30 Nov 2026 22:54:46 +0000 Received: by mail-dy1-x1347.google.com with SMTP id 5a478bee46e88-383ec96a7deso12785692eec.1 for ; Mon, 30 Nov 2026 14:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079282; x=1796684082; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dgYZTpK0NPev4AhLy/Qup1KP4ovTvumfsEHq3Cu8b0Q=; b=JjAqxdKESnYu43mkNuIXtXPt4FYTKMtg8sqAzkSVo7Kza+dRLTkZPuLzpSB77TtioC OBrCoHw+zuQXMXj6l6eC7Gfv+S9+mHqXuCpDLGL25xfK/9VBjn/eFTGHCqN3Q0OB3ca3 T1+Oqpy87aieYenH7V68j/CX8C3dYT4tTlCJxz2LQ3Ba/2v/B0Zu1pxDFlpthJ3Wge3C Fv1+RzW6l840vseVCkk5ZGXe6IqQZoK3Nf0nlkDsVktjKWUBy/WxX4l+1/fEhdwZV33U 6rXkvBygqsRtq1ahzlbz3Ux96c4EcCzxQH7R8IajqjFvYZGnBYOnQrmfXkPUdaj8DqS/ zR7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079282; x=1796684082; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dgYZTpK0NPev4AhLy/Qup1KP4ovTvumfsEHq3Cu8b0Q=; b=XdMAmM7ONPUTUVSsQc9J87+I5V7vHXyuI0V0JLCXEBgbtRjrPbEfkJxZFzjkLbmLZd hW42vEzP4P5MAeLdQBNCbBPQnoTRWFNRuT9fUMjB/JwfZJaXg065N1oA9LkJu5z2QpHR +5Wtlzoyi1RBcZXvynZhqgi09B+HXspmDoTVwmYAqWtasvmdiD32UAFgybOL5BWpuqMD SW4zzSX/xwawaySV95li0Eqw9W7c5QnacejpplYAivHdOKVieTXbQVsYgdHybutS/H0g E0vitsVPCbUREqR7yR6tx/7gntqgqFftfly82rNdnSwDvmqab63ALPkNitVpmz7cpCub abcg== X-Forwarded-Encrypted: i=1; AL+hErGjT2SKpOOwl4Xve112RVn/dGQc6TnGgp3YrJmdRxu1Dq+oKeefnItzECkeIPH99131abTi8LYvTok=@lists.infradead.org X-Gm-Message-State: APuU4Z/bPoDWZqJB7yJ7toGdJ6zcSaPPnfmBqiNlJksmcUhvVe1VyjyZ trDhhjoobrJ/1d8RxTk8iSnxxfVH6sMemPHW91m0GuNdd5duDWxJbF54VLDlP4m07IFdco97/Bk ndd2aEA+Nsg== X-Received: from dycui28.prod.google.com ([2002:a05:693c:601c:b0:384:8179:4ea5]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:de44:b0:375:c5e1:931d with SMTP id 5a478bee46e88-3857073ebabmr34356241eec.25.1796079282216; Mon, 30 Nov 2026 14:54:42 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:21 -0800 In-Reply-To: <20261130225428.99361-1-irogers@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261130225428.99361-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130225428.99361-6-irogers@google.com> Subject: [PATCH 05/10] phy: google: usb: Set .owner = THIS_MODULE From: Ian Rogers To: Vinod Koul Cc: Neil Armstrong , Manivannan Sadhasivam , Nathan Chancellor , linux-phy@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers , Peter Griffin , "=?UTF-8?q?Andr=C3=A9=20Draszik?=" , Tudor Ambarus , Roy Luo , Joy Chakraborty , Naveen Kumar , RD Babiera , Neill Kapron , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145444_261238_8E9BC5B8 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -9.5 (---------) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 = THIS_MODULE in google_usb2_phy_ops and google_usb3_phy_ops, found with Clang's require_explicit_initialization attribute. Fixes: cbce66669c82 ("phy: Add Google Tensor SoC USB PHY driver") Fixes: 8c2b331e6327 ("phy: Add USB3 PHY support to Google Tensor SoC USB PHY driver") Signed-off-by: Ian Rogers --- drivers/phy/phy-google-usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/phy-google-usb.c b/drivers/phy/phy-google-usb.c index 2acdb2b0e534..b820b1e34ad9 100644 --- a/drivers/phy/phy-google-usb.c +++ b/drivers/phy/phy-google-usb.c @@ -348,6 +348,7 @@ static int google_usb2_phy_exit(struct phy *_phy) static const struct phy_ops google_usb2_phy_ops = { .init = google_usb2_phy_init, .exit = google_usb2_phy_exit, + .owner = THIS_MODULE, }; static int google_usb3_phy_init(struct phy *_phy) @@ -470,6 +471,7 @@ static const struct phy_ops google_usb3_phy_ops = { .init = google_usb3_phy_init, .exit = google_usb3_phy_exit, .power_on = google_usb3_phy_power_on, + .owner = THIS_MODULE, }; static struct phy *google_usb_phy_xlate(struct device *dev, -- 2.56.1.839.g22a8290db9-goog -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy