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 From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079295; b=WacwYYMCnQhCOQ4kd63J5zrCWsPXGnFqj3DHG9/tqVJFitGhC6T9nD2NDHgXFdTwsfsX YanrMTqvlGrl6TLhcyrJWmcwR8oiC1SQqRf9P9RoaZJWJmUdBJ073cjuIhb5/QsaiPPgm PSo6xa53lR/5MPolRL2END/oS4CPs6V/EFyYdZo4gHAJxK0Hra/kkTibmLGcXoESz9tHV mO0ocnnUIS7Iub9FDAAcLFLqPGCpmedKPdSZLigMYPyGn4w5xVMDEobhWTP6r8HjIMA4M Sb1Qp6O9+itgGeNjlpfec52kiMm9VSIVe4J/OKuId0YlIQpKLwfUEaOoNdDn9UrbK5w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079295; 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=kqYRPjiLDtXwpkSmlgnYXk6QWlcT9ZYui+7MMwnmtTI=; b=QZwOVPtHr9WoIWJZjfEByq2io8kYbiGhQuB0OW4dMTgWCtj9yh6GEJ6cWGl0sJb/uJrC RpqQHw15s+TXHLLtl8ZXIf9M+rPO4t9C2MFEIcGlZj40DJJQBhMec8dRXK8NL7bw5zC19 /Yt2HDhJkJqWGkVUuiZIfMo1f1Aa+NE6Nqm2ZeYXLoEKQE7pmnwC9B2sRUdJoZthsSmG7 gjmyOFP/l1gNHrfMS6hQjmM8GrLfNBV3JiIU+M0TLajANdIw9AGJBqSYILb28cqUh3+8P rZv8aMeXfYcKHilbcwG56pu8bSC8n+1TFxBIeBPV/lB4pKDJ4qXzxofF5Z3wmXF4bLw== 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=KGMOjgam; arc=none smtp.remote-ip=74.125.82.199 Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) (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 E084C606A69E for ; Mon, 30 Nov 2026 22:54:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E084C606A69E 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=KGMOjgam Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-386177b0516so2526000eec.1 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=vger.kernel.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=KGMOjgamBNL+dujNfuz+3D3priWSlM0uCaARJ6P5aws4png8KWQnkBNtEy/YaWN2L9 6xADQNS7LjgPZXUe9dWdLG5/0DH1dE6livge16GdF+9hl2qDQyjrVZKEtwraTg8zi9nc fQnV9CRM/bxggfUpLUBsvnHZzi8SiVcubvqXkz6jH6BcpuQMzycFmoyy5Sh3a/nFcw+g 5OL6T426aqQqB7cL6s6w8cBK53yDknalfnD9jZ6Y22/pfD2nKHQvutTtccohI+Wy6GIw qp6NzYeM1Ve0BWR+X6nUTAmFB7+lKoFO6o/rrWKqFVOOxE2xtbEOL+AcchO5e7TY06EP cEbA== 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=TE0scr6Q4PPBKKQHSqk04+NWFzMtv8kVA3bxfPWqiNGwG1/+pecTbXbPUPw+5yJZJl Kfv7w/k9dcGX4W+L/LL9B3329vg+hEGBi72ICXzrB2R7QPTdJWlPoBJyL7l7xVMLBL2h +xomqfxMmC22e56vA0YdczJPefwED+2snKqYu6VKt21qD1CUvJ51CeYvrW3aaWaVzoJv DP2YeJ7dJ4TpNIhtx82J49KCpady4nChmMTi0XPQva/YvgTBfzxqjlHnGX++Z72EVLNS 1ZfOcVcr8pTDvRprRyKL2SM7ndzgtvkwzOIak8om9mfEJ5+bk5S2XimSb9QHsggk8/VP F5Yw== X-Forwarded-Encrypted: i=1; AL+hErGAlHkXSAHC4/U11cNeuvtgti5NaUE597D56LLlcIgvMnhPnavFo7+iF8V7dXNSVEqON0pPkWtzWMvp9w==@vger.kernel.org X-Gm-Message-State: APuU4Z+E29Ph3lxAnevdghH4JNlLmGNnZVMA0HYPj3LoFB5NqFZADG+a lNHqF/QQJU9nYVQTWHBOVu20awnYszVSuD+BJVCbuVe8646mcUcOYJV+ObfZOB3oMHfaM78LFQj BAL4u8EFUQg== 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-Mailing-List: linux-tegra@vger.kernel.org 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-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 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 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