From: Maxime Ripard Date: Thu, 23 Feb 2023 18:44:32 +0000 (+0100) Subject: drm/vc4: hdmi: Warn if writing to an unknown HDMI register X-Git-Tag: accepted/tizen/unified/20240422.153132~401 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=402619cca43af6e6bbf85b936a2ab117936b5451;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: hdmi: Warn if writing to an unknown HDMI register The VC4 HDMI driver has a bunch of accessors to read from a register. The read accessor was warning when accessing an unknown register, but the write one was just returning silently. Let's make sure we warn also when writing to an unknown register. Signed-off-by: Maxime Ripard --- diff --git a/drivers/gpu/drm/vc4/vc4_hdmi_regs.h b/drivers/gpu/drm/vc4/vc4_hdmi_regs.h index b04b2fc..68455ce 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi_regs.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi_regs.h @@ -498,8 +498,11 @@ static inline void vc4_hdmi_write(struct vc4_hdmi *hdmi, field = &variant->registers[reg]; base = __vc4_hdmi_get_field_base(hdmi, field->reg); - if (!base) + if (!base) { + dev_warn(&hdmi->pdev->dev, + "Unknown register ID %u\n", reg); return; + } writel(value, base + field->offset); }