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=BZleLDZHV+UbH22T/IAvztfH7YfrU13TcvWCd0GWNvQ+kmv4RsKfeoC25FIJWnpiV+uS pPJkhLrlc1+LDJHIzLIl/Em2zCxL3Qx4QE5B/rJcX3OReYdUAeMNTkA1dnetAnYMLBSvy l9nosIE4bZOt8mg5YWOuz/dJAGlZaMOY82gtQaeV7Dv+pf7cLCo8mHncQi6uLd4A5CC32 MFUTw/wE8eFCH0qwn5rb1YNwwYPpFdroUL8j9J7S4nWUUYueKexRFBeiJ8jQ4F3N28rPB CJ9eHHgNnDCr9rLkJX8hORyAiicx936Nc0NB6CjqtJRd8qWofTlEILFdVQkVGlr4lPg== 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=SorSOKrEgMjBH/mU/NA8YN7jLF3WoH1NqKUeOrUu5hq+keavaKv8bXK1T07dCGld87pj mMUQKrYvCdUSme05S9cPaF0EMucTZdFzubK3XNLNSG4Sky2qqDWOQBhYpKVX68YrbhD7E 2+4aS/v4HJ6kmxysf/k/3PYogHe7mIlmfbpv5s/bvCt67lGzTwiDgvOO5wvqmc62bmysc 0HGcqu+hGNANGqt9kgLGbgVP2TF4piInBor1JOpOoDZUDafm3xiKjuYTmEIWMVLrckgQu uQwlSWfIK4v2vz5dPG6tZmnjKUvD2iH/YM7Kz8FkYiScI850X8DGxd8V9hsRWpD/FnQ== 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=hj0Gs72P; 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 E62FA606A335 for ; Mon, 30 Nov 2026 22:54:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E62FA606A335 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=hj0Gs72P Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-382af5cfc58so2217785eec.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.linux.dev; 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=hj0Gs72PPGWV0hmmT+VCxVvnFjX7qb0GcxtG0A7Y+mc4p0qAKmwrbdsENk2yzTOjuk 5HV+G1k2lRDz0pG6cBrXUQVWDFiLftQNeZz458WApETKM5P8hzsdX36pC1DBeEMw71H6 1I2bFn7Jx6kNzPsHG9ZinxbCXWhmQ7uRl88BNlw6hOARD5LY4P4f9wqtEe6GL812NAT2 9n1L2hygBKSNszJqLLwbcO+n+cd4lwdaK2G7GWs9yD14WKGXp1pb2sv0qGD3p224+qOb gmtN8Ua93x8G61bKPoYCKK8n9rU9iHzYXKU9F+vCCvAalyERywkcopqYIHfV7QAzlT99 H0Dw== 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=rF/8Uc56EVm9Yt0s3Rhw3B7tfKNGFNlR0hP11ajD0tkpNfgu0jQcykU+igHxS+eeUE 7X2AIaVI9rVwQOKu8JbzO4wctKQx4j+TFTgNVZBduuVtDd/PyanW8QF2DCwZG47pCjQz quBRcs7875/t5y20o7fXx2wfr5NqJz+BZWteLKs94mTtCViVEvYN4D3o22ayloiJERZ9 FQVMWsarGyjI8xaEswZsY/VGez/8PS3aMhBQRRsiqQ6J160nrEktrEMoGMD18RCO/Azs QMq1GucxyxgQVlYBAdqLTvRPuP6Eean6Flb7K/twmef5K0CQwvPbh7xiXx9x0hd8E69g kjCg== X-Forwarded-Encrypted: i=1; AL+hErFjzZ3VVBx8lTjKBxK75QECIOtkPNfcaj9gDuwzOJX3USLYpkopszAwQVeaZT7F2c2gfdLJ@lists.linux.dev X-Gm-Message-State: APuU4Z86URh4vV0mZldNg0/PD6+ocuiQn97AP5wGIziDM55V+XB4FX9+ rZZ/TIgivyuFWClw2DpAA+fQtzirSYwOYSSVJ2/4XuOSgdw5lxB7X3lqY/LNj/og1hi38tJGlHD uhOVIVQPbvQ== 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: llvm@lists.linux.dev 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