public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Subject: [PATCH 1/7] drm/msm/hdmi: Simplify with dev_of_node()
Date: Wed, 11 Mar 2026 21:17:25 +0100	[thread overview]
Message-ID: <20260311-drm-msm-hdmi-cleanup-v1-1-c5535245f6de@oss.qualcomm.com> (raw)
In-Reply-To: <20260311-drm-msm-hdmi-cleanup-v1-0-c5535245f6de@oss.qualcomm.com>

Simplify chain of pointer dereferences with dev_of_node() which also
checks if 'dev' argument is non-NULL.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/gpu/drm/msm/hdmi/hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index 5afac09c0d33..b1db1b597901 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -91,7 +91,7 @@ static int msm_hdmi_get_phy(struct hdmi *hdmi)
 	struct platform_device *phy_pdev;
 	struct device_node *phy_node;
 
-	phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0);
+	phy_node = of_parse_phandle(dev_of_node(&pdev->dev), "phys", 0);
 	if (!phy_node) {
 		DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n");
 		return -ENXIO;
@@ -287,7 +287,7 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev)
 	spin_lock_init(&hdmi->reg_lock);
 	mutex_init(&hdmi->state_mutex);
 
-	ret = drm_of_find_panel_or_bridge(pdev->dev.of_node, 1, 0, NULL, &hdmi->next_bridge);
+	ret = drm_of_find_panel_or_bridge(dev_of_node(dev), 1, 0, NULL, &hdmi->next_bridge);
 	if (ret && ret != -ENODEV)
 		return ret;
 

-- 
2.51.0


  reply	other threads:[~2026-03-11 20:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 20:17 [PATCH 0/7] drm/msm/hdmi: Simplify the code Krzysztof Kozlowski
2026-03-11 20:17 ` Krzysztof Kozlowski [this message]
2026-03-11 20:45   ` Claude review: drm/msm/hdmi: Simplify with dev_of_node() Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 2/7] drm/msm/hdmi: Avoid double error print on msm_hdmi_get_phy() failure Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 3/7] drm/msm/hdmi: Simplify with local 'dev' variable Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 4/7] drm/msm/hdmi: Consistently use u32 instead of uint32_t Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 5/7] drm/msm/hdmi: Drop redundant 'int' for longs Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 6/7] drm/msm/hdmi_bridge: Simplify register bit updates Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:17 ` [PATCH 7/7] drm/msm/hdmi_hdcp: " Krzysztof Kozlowski
2026-03-11 20:45   ` Claude review: " Claude Code Review Bot
2026-03-11 20:45 ` Claude review: drm/msm/hdmi: Simplify the code Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260311-drm-msm-hdmi-cleanup-v1-1-c5535245f6de@oss.qualcomm.com \
    --to=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox