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 34097606A32A for ; Mon, 30 Nov 2026 22:55:10 +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=vVbnONJq; 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=dCp0Rs0A 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=ySQWGeQRyoBAlBV/pHLTFWl8KJDMbra2aXmUaba94FQ=; b=vVbnONJqcPfPGZdAwau5hmIJxu YMB3JhUDwws7qWr5+7Mdlj1Gd6myKNJD3vMIfMyuvyiQmusBRd6yRBT8E9AaIXO5Jc8eb/OQFqYyE dqSb9p7X+5hgeiaXLchXr2ZIgnnYeyl2JAn34dPCHompK/S8jUzlJQmaT+9yy9Jzqq8jV3U80D/vq NhCG6+89gjdEd6uUOcuZh2rVOHBF0nqPZpDT3vspbbX6YAd6nRjF9S5MrUKXqkJ6WaqSah5Y2+ygb dRNTu0cv636w7y8bZKgsTCVBrOxp+0Mb6GoI0slUSW07qt90xIaL5kLlgsO6UTlRVvewYHeAxZAh+ a2kb9rpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAH7-000000060zH-3gcr; Mon, 30 Nov 2026 22:55:09 +0000 Received: from mail-dy1-x1345.google.com ([2607:f8b0:4864:20::1345]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGt-000000060s5-303x for linux-phy@lists.infradead.org; Mon, 30 Nov 2026 22:55:04 +0000 Received: by mail-dy1-x1345.google.com with SMTP id 5a478bee46e88-382af5cfc58so2217782eec.0 for ; Mon, 30 Nov 2026 14:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079294; x=1796684094; 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=kqYRPjiLDtXwpkSmlgnYXk6QWlcT9ZYui+7MMwnmtTI=; b=dCp0Rs0A19NmpHXmaFW7c0s4TGnDxnp6R+SMTZGaTRAQHzllT4VoTsC2exjr3r87/n ts2JsHb6XH5iJ7+Of/xzkHbtVMWqZpCZ6zTA2hLdNG6dX0wjrR6R5k3Z4hRO4TBJjq4O XFiAC+PXsSRMdQx9kDOtIxPjE/uCaQS25UetrzUSio8K0mtbU9NExsyl32GkuNZeJdtj 0dxOELfVGNQb7F0OHJZHN5o+TV+D03kPVJdUovGIk/BVLWkwpRm4S12t7Zpby7TegpIj QyjO9R07wnRBWJDsQulIJt1Qv1Vd5iDVWPM9ytqLPxkXUDn+Csy5+l8g6pRflm8TgSvJ JqHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079294; x=1796684094; 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=kqYRPjiLDtXwpkSmlgnYXk6QWlcT9ZYui+7MMwnmtTI=; b=IqD5OPIStBkh9EPUmsTlnAXs+ZZXqh6tJds+hlzYNdxt2jMmHcBpGcKZPI4jJizdJg TcTZC//L6h0ewDy5Y0tHpt+s7ywn+ESW2K5011UoIO1yRN7fTnYhGZl1ZihPIqdz9VKb Jj66emIkRvgyCyd9cup6IX1ZW0PULNSwr/w8FrH1353qBWYAJIH+AlPNQca0nSqoMKw/ Qml2LhXwZebLBgWrRd41LCNSWs4/ToebiKqpYSFNJxkZtevFQ1WjOmJ4+1zUe7cXW1TT PD80i5tEAnZFju0Mhx5Q4uexdjvFW4stxymnjgLwXvztwvFuM2XAb93OR/l9msfHp5j8 /Lfw== X-Forwarded-Encrypted: i=1; AL+hErGxzyVT9D0WiTAKh4hYRAM3dtqlK6ygAIwFOr66iiAeDFJpYb7P2amtS5tihnyiVhnfsjBEDkJ7emo=@lists.infradead.org X-Gm-Message-State: APuU4Z9hlaPwC6Kd+ehtBWkxfZ20AuNlD/FXEtdExTIF+at1N5+SkBFP vbI1zx/W6xU8iRN9mnGHuTTO1NtmdaaWlnVE2+gkrt8QemTmY+v4o5KyjaAL0U2mC/NejCOsH4f Qpvx3SpDW6Q== X-Received: from dycpz9.prod.google.com ([2002:a05:7300:fe09:b0:376:93cf:d6ce]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:693c:8957:10b0:386:b089:3520 with SMTP id 5a478bee46e88-386b0893ad4mr25751722eec.19.1796079293768; Mon, 30 Nov 2026 14:54:53 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:26 -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-11-irogers@google.com> Subject: [PATCH 10/10] phy: tegra: mphy: 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 , Thierry Reding , Jonathan Hunter , Kartik Rajput , linux-tegra@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145455_788689_C45E3F2C X-CRM114-Status: UNSURE ( 9.21 ) 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 tegra_mphy_rx_ops and tegra_mphy_tx_ops, found with Clang's require_explicit_initialization attribute. Fixes: 256cb243f4c2 ("phy: tegra: Add Tegra264 MPHY driver") Signed-off-by: Ian Rogers --- drivers/phy/tegra/phy-tegra-mphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/tegra/phy-tegra-mphy.c b/drivers/phy/tegra/phy-tegra-mphy.c index 17722aaaa361..a054c102229a 100644 --- a/drivers/phy/tegra/phy-tegra-mphy.c +++ b/drivers/phy/tegra/phy-tegra-mphy.c @@ -276,6 +276,7 @@ static const struct phy_ops tegra_mphy_rx_ops = { .power_off = tegra_mphy_rx_power_off, .configure = tegra_mphy_rx_configure, .calibrate = tegra_mphy_rx_calibrate, + .owner = THIS_MODULE, }; static int tegra_mphy_tx_configure(struct phy *phy, union phy_configure_opts *opts) @@ -339,6 +340,7 @@ static int tegra_mphy_tx_calibrate(struct phy *phy) static const struct phy_ops tegra_mphy_tx_ops = { .configure = tegra_mphy_tx_configure, .calibrate = tegra_mphy_tx_calibrate, + .owner = THIS_MODULE, }; static struct phy *tegra_mphy_xlate(struct device *dev, const struct of_phandle_args *args) -- 2.56.1.839.g22a8290db9-goog -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy