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 A20C8606A33C for ; Mon, 30 Nov 2026 22:54:47 +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=IoQM1GU6; 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=omN9YcVy 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=erh1M/a4UkG0YfuirRO5TBgFphsRRS40Dz+FADl7JRU=; b=IoQM1GU6r5kVBqrHIZ1sFFIPrN iGxC/1mX3n0CDxrA8fAelBpoxI/R52KYfValWIuydD83obRY+v0rjXtpRjtpP2RsLQAC1F/rC1J7X u01CB4Z+sJSlpKg/3OpzRoPovEkAMeN44EWtuh4sXa6sZDsWzI29wW4JcVImuYnBkPllC6pDHMnp7 xTbzSmZiGFA+ksJsHQLyzaGDeIsZCBWjGFkAovHrAXzyngmX6c6KNy3P4iUIO9bHB2MjTZ0Ztl/k+ Jv6dhe7MhftJlF2cHhHsdecJ2n2A11TS5RhL3mo1a6q3xWbPlAZNnmZl0Md+Vjf++QxgFy5zo5JAS h1CuZS5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGk-000000060ms-47uX; Mon, 30 Nov 2026 22:54:46 +0000 Received: from mail-oo1-xc45.google.com ([2607:f8b0:4864:20::c45]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGe-000000060g0-0coU for linux-phy@lists.infradead.org; Mon, 30 Nov 2026 22:54:41 +0000 Received: by mail-oo1-xc45.google.com with SMTP id 006d021491bc7-71ad455a8c1so5212001eaf.2 for ; Mon, 30 Nov 2026 14:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079278; x=1796684078; 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=F6ITWk9zTe7P6dofCF2syEcgSQAMZilRjqR8qkSRQRk=; b=omN9YcVyJaF8tBB1k1lyEMZLr9fAo8I+qe0gTipXXrjZD0NG6duMQtpoHBccUbTKd6 j5ryFPNnTF14hYGY7p8qPU/oJesmwrbN9QF8D52+VDK0CT3ZFOQYdPb9xW7U1eV74Wxa LYn3wdfFYn3OsWUyKkpQliLPHtkspKql9Wx4Il8Lxp1jF/myne6gQAPJwsgouUfmiK6Y 7hPRAa90u5I/OeWVPy/9TXfu0kA31mzSQUooMbLAOs7lgZe1KP2Kf5TOATrb7U4yKHDK v0mBRadI76AnbpvBV2Maj5rDYdODvC9xpu/1BfAfeL1xkqckDmL0HNfTqHybJ5XmVFZj 0lzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079278; x=1796684078; 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=F6ITWk9zTe7P6dofCF2syEcgSQAMZilRjqR8qkSRQRk=; b=y8iIY3GTbJwQprb9U2DQIdjeYbqfkwKW2iwM5WMeHRDHnQ7m7xNLTgDs8UAPuMgzp0 i6mhNbj9HbxzbfFNeyLj/qF4uxO1QeVrddTMqdUOt/u7otXwnl308M/9I93DRBkkz1LO Iy2tK+S3JpfuMUNzzFpzti8m+nPxD5NZr8R6vyERjMVemix1ccDT5yMS2Mv94VKsVdmp wrWTqoK7oulcReHf+GF2ggjleOjMWMEQK5lUMslRBUyLKkx6i0RP8DdWQbpbRAtbcsK2 0mS7g8hBbMM2mWpqX9iIjok3yox5VXBskfUv5konNFXJwywCtmQS6/PXQXAiT4WiXra5 TxJQ== X-Forwarded-Encrypted: i=1; AL+hErHLzaWNPuQI9z0OP07isCht0xQkqWzwRQf8PbZvRNpTZ+Xvpblzu6bDGbnPW85IBOfAed2VygWAucU=@lists.infradead.org X-Gm-Message-State: APuU4Z/AxuaM9g31CFg8nMmymb8dlGreOENWrV04OMFdMOPDIjCx+sFl r8NdgrFmqBGea01/vCM1Boo66epbcvOjzgPvine4WpkUR0Mi4Xj7XfTg9k7Iqrs/NUWQVXkRkMu UMRRd7oNI5g== X-Received: from ooqq39.prod.google.com ([2002:a05:6820:6ae7:b0:6dc:f82e:106c]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:168c:b0:71b:3f6d:610e with SMTP id 006d021491bc7-71b3f6d6907mr25277436eaf.33.1796079278381; Mon, 30 Nov 2026 14:54:38 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:19 -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-4-irogers@google.com> Subject: [PATCH 03/10] phy: cadence: cdns-dphy: 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 , Maxime Ripard , Sakari Ailus , Kishon Vijay Abraham I X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145440_208790_DCCFA361 X-CRM114-Status: UNSURE ( 9.00 ) 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 cdns_dphy_ops, found with Clang's require_explicit_initialization attribute. Fixes: 7a343c8bf4b5 ("phy: Add Cadence D-PHY support") Signed-off-by: Ian Rogers --- drivers/phy/cadence/cdns-dphy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c index 483e35c82a11..00167cefd476 100644 --- a/drivers/phy/cadence/cdns-dphy.c +++ b/drivers/phy/cadence/cdns-dphy.c @@ -463,6 +463,7 @@ static const struct phy_ops cdns_dphy_ops = { .validate = cdns_dphy_validate, .power_on = cdns_dphy_power_on, .power_off = cdns_dphy_power_off, + .owner = THIS_MODULE, }; static int cdns_dphy_probe(struct platform_device *pdev) -- 2.56.1.839.g22a8290db9-goog -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy