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 97ED4606A32A for ; Mon, 30 Nov 2026 22:55:18 +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=h4/ID3Md; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=hPJY/n7Y DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:From: Subject:Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=dgYZTpK0NPev4AhLy/Qup1KP4ovTvumfsEHq3Cu8b0Q=; b=h4/ID3Md18a2fiJaS43xVz/aGA lWNkyMWvSSAXNkjXfYjvOpEUFYfnf+N79dDUby8n0kjDjmiDd9w5KbKX8RLEESa0GrOWRXwLvttne HvPWCGLyLDW7Lxt6dfzinEsyTsTZZHDuceh+w/EG1mylcZ/Zqa7d34z8+3jt0rgthXcmNA4hVmTKM 3XpHlY6KHajxTidSshzZyNve37EmptY0rK5n0XcrD7KA5gRTUbef8qnMH9E6+rq3kLf7RPsIVkwHr /VGh1c+WGVP1j5xJSt1c5DDoR28MYts/tbtLcN05QeuYHuTj+4dWYXs1K7yuMym0dTIw6R6W3Ofde etvgk+Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAH4-000000060wC-0i6U; Mon, 30 Nov 2026 22:55:06 +0000 Received: from mail-dy1-x1348.google.com ([2607:f8b0:4864:20::1348]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGh-000000060jC-3zel for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 22:54:45 +0000 Received: by mail-dy1-x1348.google.com with SMTP id 5a478bee46e88-383ec96a7deso12785695eec.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=1796079283; x=1796684083; 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=hPJY/n7YbpWSwdMWuJFttkxg6y4d6JN+rqUF5chITizBjV7XoD3jUpenrEblMl8t+7 mPTF7aPaBQV7RHlXdN9AcS71iGZxKBGUCMSMpMhhPKoaW+hzkoGTjKfwThYhlNUNhBEZ 36WL0hP+RYGZo1qHbChpNFVz4d0fhK1EayMsNS8/hdpJvTuaXtBB9CPzh9d2JZbqm1oj SzE/wX6sR9mELoStK9hpIAFlfexZkVrFu4B05a+hbjBR4P9W07dOcTSDn14PQ/LeHY2T DjQkT2WE7ncicI4goFSCaJcbCaK+D8ynNajxxlkazyizEty7uRkdXPGh6yVzJsnG5MGI dGIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079283; x=1796684083; 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=LMWFFEnuo1PCJmSxl52Nw51qDgSjTJLNVxnoCn+DlK1hCITB0XdRaVhn2NT6AmNVdL tUulnDf52vjrJHZaACYOcrVEm0kpd1wA4rOQ9qCXPfMLu7NDmHjptwjOYAc2KaaYB0UL 6LZVDEtnfI/OO+Dth7UjlACRxftkfTP1qItWjDN+z/7wjLVJZlEAJffe5rQFIjb0WfNL IR1/UiTgAbFmeYyl0gvPdsVLiLwTNtTcwfqTHxjW5nbzjbFWxViKao0strMGKwb/VZTb fe/rRCb6Y6R9FUjlBmV0GeFiqQ7nxUjbK07seHO3+MF2ZUWybm+Czbu+Ezhmlcc6DPbX W/ow== X-Forwarded-Encrypted: i=1; AL+hErGvdTgc/A8knM7m/VDeSb1I8Nqydq0bdNBlJMLSCsKgTg+fUne+SbTbOWlUHJcRumpgHRvVTj6EY6sxvNmSty5V@lists.infradead.org X-Gm-Message-State: APuU4Z8cy5G9i3dicuagRgYTGdGOg16wS2Iu/ju18EG/24dVPJb1so0V bMOAkcQ7qh+zkQ868vUR6f8UCjPdOt0R3rRLTcA5YTYzGjsKBPMpX/2YaATkUDlHiX0VGQPD/Wi nKxUUk1ngIA== 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 Content-Type: text/plain; charset="UTF-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145444_072899_04D80533 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-26.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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