From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079286; b=PG1JMQyLN65n5Ov11LUTXYjPEKQhiT/7tq11h3sqT52pFKr42VByX++aau/HE/TVYldS DlnfnMWVW4arNJtIdkuZh2vtF5gWmkyyd/rAuwlU7nOknrKuEzJjpsWkFFRoNeo9RxERi 42/dHY2dJGa1l7OOenrM0vDEYvl1w4VmOjCHSshvLpG7L33Syjbev3nrq9BRivm6ggQci Ul0RBNjZPCZEH8S1IddCkBb8VqKNKLCNQH8/K0oaO4/ONtlDlSWSeY3l6wEwAmJ/wP/dJ rjLk6ahk0UkGCXKEEXYt5TomGfKYhR5c67QJuvGrkveRSX3KddGWfaRbh9smp+Fs9yw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079286; 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=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=fbeqpWf1Lwd/0rQFcreVj5DVbViUyXcaqiCJ8Ap6bp1IS+3LYrZZtn1yNrc3gCKItSda Pv1yi8abSWLedA4f19MBI5OZA9KcT+iVfzBk/T/Xanoko6BMbCcx/IRYxmYSPl58E8lUE q8aBzduR0iN9pgfwlhtoS+CvErz7qGcsNVdHXaIpouUWpu5ymNy0+rghrlRDeyoDD9CxC nVuM609ZRgy0HZoi2w/O1HQdm1PnEgQrAAUVDoIk6qknbtp0rxELhDqMmX0anGjRc+l0e Y+yFbsYzPCXLT56xztRRLkjr4AUgBiePqyC6APO3LkLfDJBXlGSRee8fW16TFn1pikA== 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="P/7yDsxD"; arc=none smtp.remote-ip=74.125.82.69 Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) (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 C7348606A335 for ; Mon, 30 Nov 2026 22:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C7348606A335 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=P/7yDsxD Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-1b55f4f3bb8so6819416c88.0 for ; Mon, 30 Nov 2026 14:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079285; x=1796684085; 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=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=P/7yDsxDs7wmYkHFaqmn0mA2RiXTLhiXhZT6sxfEykr953J57EVJf6EWdNqDm2ahwm cmXcOtOagNjRRnqEV/hEeUg15WC3jPznYpxJDoRTwbVNR4VVQAE+hjoW++/FYlN3o47F ewBJMfIpIWqq8vKq8+nvRaMLNEKvHnpwWs+hJTM9eIcTGGHIxdHIsjBcKg4FOhAS6VLn uFKT1ZnDIhv+1P7Vz1dWLa3RZV+l0F44FNuPcW6+04MsCoYcPepOL41+ginDHf6Oj5AX hTdqUBYTgFgMHS9JWO2q3lQC+g/PbM+lddKrjzjBLHlY38qEEB4LWtivhWQINiorhc0U 5wiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079285; x=1796684085; 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=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=MyncOJHRpRLupm0m1cz5oJXLDo8ypBCJk8zgKeJjytlLhgV2GULf7UXuivFitgDPQQ n3sVMAcRobbteG8iJsaUbSFqG2p0vWO9aA03iq/RLiPXVqLTfYynUJzm/kpai3nwbMW7 h400B5FknuMMf8XgCOTzerrnmFDDpk0ARkuTB5qSgirxWWbQN6BNkPj4mFXSAKE7K/Xw JlvGr+OUWnK5HlbYpdmAAFuiwntF4eDtBRuoK2rnDMt4buf90JV3fOt2R1lni5wVpm4U YYNaxhikVm5ra1CvDx6uwt/LUys9E2fwVZtYy41wAg1oHvLZf2uJF1qhw53ZhTr5IEYG rB+A== X-Forwarded-Encrypted: i=1; AL+hErFHEGcSHPtwy7XktP7BUoErjvB8d5u0iCIDOwkr7P/yoWvRTgQ+ZepMvKBuU5870/9VzgRRd6G/LgZ1d9c=@vger.kernel.org X-Gm-Message-State: APuU4Z+O01JqGJMj6op4573u4cmun5JqLe18MFActYvVTbpuhhcG9HBI wLM79N1k/u7d36SERxr9QgGgXit6D0wB2kIh8jhnHgqKXstoGKvWbLVOdvET2l+asQn5ekRGGJt hxLrdPcVAFg== X-Received: from dloo27-n2.prod.google.com ([2002:a05:7023:a5b:20b0:1ab:7a71:e7]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:701b:4354:b0:1b2:6cba:7f7c with SMTP id a92af1059eb24-1b5568fdafemr31794054c88.37.1796079284547; Mon, 30 Nov 2026 14:54:44 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:22 -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-7-irogers@google.com> Subject: [PATCH 06/10] phy: qcom: ipq4019-usb: 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 , Robert Marko , Luka Perkov , John Crispin , linux-arm-msm@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 ipq4019_usb_ss_phy_ops and ipq4019_usb_hs_phy_ops, found with Clang's require_explicit_initialization attribute. Fixes: 3c9d8f6c03a2 ("phy: add driver for Qualcomm IPQ40xx USB PHY") Signed-off-by: Ian Rogers --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index 13ccad70e77a..afb2b10030cf 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -50,6 +50,7 @@ static int ipq4019_ss_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_ss_phy_ops = { .power_on = ipq4019_ss_phy_power_on, .power_off = ipq4019_ss_phy_power_off, + .owner = THIS_MODULE, }; static int ipq4019_hs_phy_power_off(struct phy *_phy) @@ -82,6 +83,7 @@ static int ipq4019_hs_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_hs_phy_ops = { .power_on = ipq4019_hs_phy_power_on, .power_off = ipq4019_hs_phy_power_off, + .owner = THIS_MODULE, }; static const struct of_device_id ipq4019_usb_phy_of_match[] = { -- 2.56.1.839.g22a8290db9-goog