From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079280; b=RlpRb5UICZny3M+J9d+lxEvY+DfIKXNezjZkqj7E8Db9Zqtqd38t0gKwVNDFaoYwBuTq 0zaz7G9nswe8ShWT56StELfGdSIpFAflm2f+b71M/pRRKMvyXHqU1Ziyxl6socHHr9Adn e3Vsa1HZmDJMiuu3BnYA5Sjx5Rey2qpQaWN5rq9de38UrsVcJHtZhFqUQuyGJ8aAQb2vV l4rmBZnd8FV8HnBs2Q5gS+zDZB0/f6jPIYKGY3Tl8ErcEyO3XTJiEJq1ZHv8iMJbWiBrB k/EmoMtNjFc1geZ8NL+OToUoeI7LbP7wj1RF28rkH64X1VDxkPA9wEndpzp4yHDdd4g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079280; 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=F6ITWk9zTe7P6dofCF2syEcgSQAMZilRjqR8qkSRQRk=; b=Xt/C6ypCGVO+Hox21mp6eJ0kSx8DASL+CtPOR0nxtVqTEkdBKAFXoIgO+cIVe/lOwvdf BdOYF+SL/eXeDSQaHsuzyrVUj4akmxze5BYrArY/mlQH3qLvebs23s5X0myXd9vyp588S Q7/NSz9klnXP9mB/E2CFgcn/7+/i3W9U95qfQSoLFC+NnqD+v6PcRoX9+xe6nvoERIAFu /x8L/PYCh7ee/4Cc31yejY7LEOQoxd9dlrzsroyLp3LHXY/i2HCkc72pxJCr/faTKmNsb c9XmUC0wtvAQJJh82GkbKDIH8/mJ9nOMsabSmQ7/5w24FanPB4F5Xyrn+jFgDiCHRmw== 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=bJxO6aye; arc=none smtp.remote-ip=209.85.161.72 Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.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 AFE73606A332 for ; Mon, 30 Nov 2026 22:54:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AFE73606A332 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=bJxO6aye Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-71b689a423fso4537935eaf.1 for ; Mon, 30 Nov 2026 14:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079278; x=1796684078; 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=F6ITWk9zTe7P6dofCF2syEcgSQAMZilRjqR8qkSRQRk=; b=bJxO6ayepIXrOJKLSzrYpdm5uD3wnVHWAASRZlXT3fpUPWRKedXZ4Ccs/4dtHAGZ9k GhqTEo5+kTHgcJEeZf3ZScNDTSUEUsedx4VQ9OXmXAEMrddVsdodrMAa/ofo2V8pQqk5 dLDFvuWYDBv9JM+jz0k/kTEHnjdUO9lnG9fCN9wIth1BcZCXplfM4hoOC3/HEX4KfJMX W0yGW3yM9NAhlkJi8eMMreLsDr/frNMbbo3CilV2s2awiHvg8fpcpWBnRequP6kfTLxy MG0N5sQX8GyBvUfk/HV8AY/kvHm0BPMwPfC4pwy8Q4z1HwLMK1LK+NjbUy7wRUoSev5f LOYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079278; x=1796684078; 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=F6ITWk9zTe7P6dofCF2syEcgSQAMZilRjqR8qkSRQRk=; b=eVwUc6eDm6HHk1DSw7ld3Rueo4K/wFodpNzqauQjUy7I+0pL7/7CJAu9e+Q+7r7gJk CGAKu6187OMUSebKXBxrLTOnaq9KT3QJ5iakUar0B3yBxzTehxazVhHJRPcpt/WTppNC SLSxlJgYoV76UBXvKseEbJtWM7VvaUYq0IbXyab4tz9yOqbEGm6ySZBQiTJLt+w555fS LpV+k5xTrMWUyzKQ3mGwqDF5yLkqE/QH68Q1Yo6zc4recsL3aRoelLGt8JHl5GKyz6De N1OwTUu7zuiyJ7lf0lLzTIOFm+Fymw7XVGA6zjDjCVdrHj2oh3gncV+SNHvQR+cE+IFD 42AA== X-Forwarded-Encrypted: i=1; AL+hErH5Gmjnm6qVtCPKZLjIDPZ+YnPNtj7kOSFxGsLyjlKcOfby9lwfDSf0RuulyKgvLdY5FoXE@lists.linux.dev X-Gm-Message-State: APuU4Z+NK2U34fBwLkO4fSlP4mhkTJPSCwR2ZWZr4YrvABKwC0L1VZCG BxKD4rdmzJjSWpoWhkmWow3hF+7fWC/0R9OV8tJC5yEkKOSrDI5HM5+X1REH0HbIegkLB9+Tv+U IBtd593R5+w== X-Received: from ooqq39.prod.google.com ([2002:a05:6820:6ae7:b0:6dc:f82e:106c]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:168c:b0:71b:3f6d:610e with SMTP id 006d021491bc7-71b3f6d6907mr25277436eaf.33.1796079278381; Mon, 30 Nov 2026 14:54:38 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:19 -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-4-irogers@google.com> Subject: [PATCH 03/10] phy: cadence: cdns-dphy: 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 , Maxime Ripard , Sakari Ailus , Kishon Vijay Abraham I 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 cdns_dphy_ops, found with Clang's require_explicit_initialization attribute. Fixes: 7a343c8bf4b5 ("phy: Add Cadence D-PHY support") Signed-off-by: Ian Rogers --- drivers/phy/cadence/cdns-dphy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c index 483e35c82a11..00167cefd476 100644 --- a/drivers/phy/cadence/cdns-dphy.c +++ b/drivers/phy/cadence/cdns-dphy.c @@ -463,6 +463,7 @@ static const struct phy_ops cdns_dphy_ops = { .validate = cdns_dphy_validate, .power_on = cdns_dphy_power_on, .power_off = cdns_dphy_power_off, + .owner = THIS_MODULE, }; static int cdns_dphy_probe(struct platform_device *pdev) -- 2.56.1.839.g22a8290db9-goog