From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079295; b=eR7EM1zDx9BPSKdSqWZkIUKFiI/IeAl+8FCczG3+wGeFoKWsFS7FsRi3YAtXEVzI1lgz tlQ4pJ+/S3rR4U2FmRBw1aCcAtyw9/CpKpBIAPvHlx0tVcrVhW7L9l7rgaT0QQYmJAX5e 5kerz9FXBpHdFDapAuFQSXR7ZYsw557VrWiUAyetaH1MZ/GIqcHXckARjwgeaWoX9QNTM remGMAvZcVjlKmFxdocb43/jB/RDQnnFq/tsBoiFfBNfcrH12RBWncYoeG0380nIOnDTe U4OmcUMCPG+zjvU0CihDxPxK3IFniTJDxOgOEXI1auF/n3O9Hsog9nr8VJUAfmCLzrQ== 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=213B6nPyRyxWrwDEEMRmyUnDggIRlgUD9UcAEJZxj3xyYRudvePgPeuvGKU7nL3Z/Xuy 4+iNmlfdsARJmwcfznOlWfTi+oDmrGH/d3kV54SkNZ77u4oCEbLnBJPGd3JkL80D7Rtei 1Q4S5Bawmnve3O3hZYJZmnSWEzMLk39Jq6oa56YYXiYkp0DZsY2bs3Ti0XFF7mMSECIQ8 PC8GNEzla+7n8cSpZRcY1fhBOA2Ithpp2HSIezGLc2/L/enesLZWd+ws0orxxXx4HCXj+ C63zqfa/75fzNd8K1ozkEPhA+bu45y39/LebwWxhjy9YH1Ht2XjjzIs9hmrnXuLw/yQ== 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.197 Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) (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 D240A606A32F for ; Mon, 30 Nov 2026 22:54:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D240A606A32F 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-f197.google.com with SMTP id 5a478bee46e88-386177b0516so2526007eec.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=iGWYCnuPIosQuHrLFBhX0vV8CDmkqwfOLjOCXz3HDbxI1mXE1HDF2sA0gKmDq+17X6 kmZZlMa4KtsRSa3SAgKWKqDzJ5G4u1Oi7ffmez7uholZqxWhaJK1Quu4VW4X3kIcgJBP agFFcLZI3hs/Y7N2WwmtE6nkcZX8v0KPQvYe0jfRzGyq62CnaPRGZDRlA5szoAah9GCC 2ciapZTeRYJAxaN7TtPgRXbzBRY2R/mJeD1KTOI7TCytaFNyHyziaNeTAxKfN1A3hg+I /TgvOmGme25ShQoPBpLlMGc2qsXXyd3Pj3hxLusKaGJd9RHoP6ft3RPWwTU+S+l/0V58 JWvw== X-Forwarded-Encrypted: i=1; AL+hErHCC5Xf6dqgKIEfooE6zMmR8yuZUgNYiUz/uC6uzcsVB+sWKOOTBucUPQ+nmSiuKE8b/gpbUMaPYtpKJqQ=@vger.kernel.org X-Gm-Message-State: APuU4Z+mXkxlx8kLugYcI1F4GOJ0MIw+4FKGH+LSWQ7P0Rv60hmnkmrs K7aK+O4tOaIouquuGjNJUW49r7TnYJDEXleAc5WfMLcjYd5PRZxggAi7lMxQ8gnX2Re51GXmjSc CMWq9gmQ7qQ== 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-kernel@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