From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079284; b=DtVPVjSXZLByUIRmN1XyvX2CWnDHlaz6Gpg1bfsLpCX1nWoOQQqp0m2JcsaGGjLbxgJJ KAWvYMmOkN0Gry7fkwXkdiKAtnjI5hAHNw6KMHiA0t89moKjggg+LKDotI0sU3N2jKlb1 ddprtNOodN5Xr2wZckkGG3+cXy3Sk31u2svDTpatwW8J6FV7LU6/KFtRdUz9+4KZB54oQ yTkU1Co35KwezCkwFED6iFSPDPXJWJHkfSJ9KUedz3apkXdHXWM3jEjMkM0qZdDz/FmT4 1MZdHTy3ZjLcYSBASDNjdq2PQ0IJp/6gFhEnqcFG3+v9a/1SyLlizEirM1n7WEl6r2A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079284; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=dgYZTpK0NPev4AhLy/Qup1KP4ovTvumfsEHq3Cu8b0Q=; b=R2G1tjKXsFS8o3lJgMROUHzablXn1GpyuqSBHnYyb5xD0m9IfH0tnqgjgZ1g+NUVw8fZ Niz4NkXtbX6j2tshwHtgjiyFiNgeflCQCwp1WR5DrJI2omerZ4c6GBa3RiOUf9SKDHWvY icGC5A65HqQdsfTgWR0QsKFXMO+FzLcwUwQi32eELKsR4aNOdoISWcncRHTjfMPgkPNJU UvwuBQTKpqRui6paXghc80n3F9KMBxQozPuTjcoVeZ3NODAICxktfL9sh6wpLU35jtj2E MVOLQWFG4NBRNoRgkxVT4P9dgGLr7H47Sj3tMrx0Px0IJhTG7DgWDccqsHMAXzIp31Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=aoOfyCHv; arc=none smtp.remote-ip=74.125.82.200 Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9784606A68C for ; Mon, 30 Nov 2026 22:54:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A9784606A68C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=aoOfyCHv Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-386c3309469so8372585eec.0 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.linux.dev; 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=aoOfyCHvkOTmHxfAuUIJvtSI/0lRVnBdAsP7eNLJgNJbYP/x/suJiE9Xgu5vqPxS4p /ko0J36gpPbJ3eKnMs4CNZs0D7bhsaX3coOWQGfY7f7ZMgcwTwcseDZarnwiGV6j7Wxk 4Cnnw0VIROQXZlmHDMyo2BHspgFb+kvONnRvnvS8NIamg/6RPBD8+vZ/RWhllT4k8XVe 07MqxLnpW+Zht6qxDB+10ciJPj2NJCep+sW8snU2wS0K9YSJXZsagjBdmhbSymkdvIHa tvitNTS5h9SO5jJKJocmmaKd63BoZWZsXyZ1ZSXBAGfpsmUgAekVAvGjx8etAnXKL4vX E+ZQ== 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=HdSP/V1jrbMBapl3jaWm45E7Yk02ELCUWUUoIIRGS0Eu90cXly5Vxk8VM9evWoQBuT mOnMkdbXOlAdnSj3z5XiTzB0zAyHcfKx3PGmT7dR9vqpdei3a89Z3Q6VTlIDpgfjCACu xStBRNgS6jd9gLFupUuiyZcheV/ixTU4rEep4+VdswpfoDAc0fyXAXMWr2JBzHIxzw0/ zy8dok8fdHk9jsb0CBfMbzhT8PuPrBbVMP9j8aLVywzUCsfWfwYO+v2HslON68oe6d5U khRYF4d8keR7BCEC2WNUlVQSOqQ7U4ZvE1vPuSL1LJZWpRd5nvvxncy28UuyxcTczQ+W em1Q== X-Forwarded-Encrypted: i=1; AL+hErEwVc675NA6f2o4d/hQqu9ZvR214+7yhg+/TpiENPes3Sr48brraVno+8boWglsFoiR4adl@lists.linux.dev X-Gm-Message-State: APuU4Z/pnUjYRy1brWlT8epPi0IEMswQ2jxTAOuOlPiEUCJ+GsoLRrtk h37euLuUHsOgYcIBAGdOB4AqjrpDbsl2mOGkSsEgN4oUtn2rUgGGrAOTzCkKlYyE4+tsF2Bi/er aVKWcdZEXmA== 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-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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" 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