From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079286; b=UlhASxIelheLxA0fjF8FO7C6++lM77MfRdyfKOYy2KMK+xeL3ypwxIN8VDRmRYIJqQom svu3/iZ7nvUDZn8dFaOddGhmbQWNBBsopWnDEivu9XKR6U5RxHxKCmUSZz1mkcFjmyQ1b oNuFWc642iT1bgxlUt6UULeJ6PMK3GeV5P/S5qIxnFb5+qJorMtfq7kdlkNtUi2hEAKMe sFXWFMtt8KLvY7dRZ9MMqwaHwuLsPe0SGvN7DxJWVFydlAlXnLdlA4RJ2ZiO3hhy7sVqN Q0xCqFWWtdx4sKoL+s0PaUpXPrdJRMbPDqU8TIercE6h3H8prFNSWPaZgyeUoysmg7w== 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=qMmCQIvb5bKLuCqW0lxLM9tHp8iySuqufrTnLf8EqUy15cTxNG0CFNwBkGoKV/SyRP+m JY9dx5O8fu1h4meiiipQ8mILAsjUe22UYHxF14DgB3xyX9sx59pW7Yu23umg9kgAETIiJ yZph6JIuFwUQHZPkPtk67+XhnqRUhA1AjXhqvJ/mKQlBhC+/qEWlojykYS4SqvDwdUpqT yhTkhGDX7mcBvQ7SjrcPqLcLJWED0seITAX1+Sj36hDSH+Rcd3JS5zfWiHlokBG82fZIr EWyVdZDCgRFsJliElVEgiJPfjeuA7M/gqB+6ABz4OISCzPrNEjvDPSET14RKGkIHg+A== 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="D/uO0A9X"; arc=none smtp.remote-ip=74.125.82.72 Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) (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 CC3C9606A688 for ; Mon, 30 Nov 2026 22:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CC3C9606A688 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=D/uO0A9X Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-14373747468so10669999c88.1 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=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=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=D/uO0A9XQurzEZ6TR52PSq9JPP26UfBcZjmbL9M4WKbVILibLj6F6VVoswQ6ynPK8y gmlXUz3vzd/tKSMQihCs7i38IqTrBc08Rv+L9e/bOulOGE9pXlvNJz2FK7b+nk0DWcVv EBNZsJAMPHV1X74pFXrUWDwPk2kGPX2Zk9SmC6Y1fvAe/ufW8mk8M8F8yJIN+QzEgXsP nLH0fkJrBMCyFeV92u5MKva2si1lmR6KEj5FvVzo+jMkoK2UliHm/j0Ne3uv3iA76wTX 9BWpIFNJYOmCPT4yu8VdVkXIBbUvRn9XROffz7jtUIgi0yVE4Irp6enZnIg3qelQfKFK CDJQ== 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=0+Z77a322yLUlbQTTEgPv9aNWYzKUpPfL0czRx0017CLVqo331RhSbHoFYyHCvyQn3 C3ond9LdZY/9NJvktllkLQGnyrJ3/EMv8Jz4VCxt8iriEOSL3Qj0fOG8ktghzVTCj3a/ EHwZgxUJx3k/ONWpPLfDQ3fO7gH+KGVr43x8wsH5SCKcxef3QlgjvG+F4e2GXv57rW8K JoOH/Pz4TVelolXHQr17jKEjM9iCGuRqT79VnXtSckg4zxMv1pkXWjsKsmwKfz8f1k89 c4sQ2chEg8YKelkhd9FCMNqf55JixiPX4Y3T60n5OJNnpSAC3I5VvK/mgy4gRaALMem2 J99Q== X-Forwarded-Encrypted: i=1; AL+hErFDjBPfNW/NIumylXR1eaYvcTzT5jOKaa+XHXRT6TKSkaS3qH31X1CdiVrY7uleJYDF/dLW@lists.linux.dev X-Gm-Message-State: APuU4Z+mfMZ8KRxyEUiwphgjIeGZACFc+bU5H3QTyjuLO05+0Q5JKLXn Nn7a60WhBGzqpv/SLyRX/ngLgcjO7umk2Hf9cKHLZP/GLy6bbQFti1xpcUWf/dJ7BSyQzZyrko0 4KUG59/XwpQ== 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: 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-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