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