All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wojciech Dubowik" <wojciech.dubowik@mt.com>
Cc: dri-devel@lists.freedesktop.org, robh@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 3/3] drm/bridge: ti-sn65dsi83: Add reversed lvds lanes support
Date: Tue, 21 Jul 2026 07:21:23 +0000	[thread overview]
Message-ID: <20260721072124.9A55A1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260721071253.1098652-4-wojciech.dubowik@mt.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing error check causes genuinely malformed 'data-lanes' property to be silently ignored.
--

--- Patch [3]: [PATCH v6 3/3] drm/bridge: ti-sn65dsi83: Add reversed lvds lanes support ---
commit b4313ac661e9afa3be192ed6d9fd4791e5f7c33a
Author: Wojciech Dubowik <Wojciech.Dubowik@mt.com>

drm/bridge: ti-sn65dsi83: Add reversed lvds lanes support

This commit adds support for parsing an optional "data-lanes" property to
configure the ti-sn65dsi83 chip when LVDS output lanes have been reversed, 
allowing it to program the corresponding hardware registers accordingly.

> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index 1869ebe13366c..e1b6e22bed359 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c

[ ... ]

> @@ -845,6 +863,19 @@ static int sn65dsi83_parse_lvds_endpoint(struct sn65dsi83 *ctx, int channel)
>  	else
>  		return -EINVAL;
>  
> +	ret_data = of_property_read_u32_array(endpoint, "data-lanes", data_lanes,
> +			ARRAY_SIZE(data_lanes));
> +	if (!ret_data) {
> +		if (memcmp(data_lanes,
> +				supported_data_lane_mapping[LANE_MAPPING_REVERSE],
> +				sizeof(data_lanes)) == 0)
> +			ctx->lvds_reverse_lanes_conf[channel] = true;
> +		else if (memcmp(data_lanes,
> +			   supported_data_lane_mapping[LANE_MAPPING_NORMAL],
> +			   sizeof(data_lanes)) != 0)
> +			return dev_err_probe(dev, -EINVAL, "invalid data lanes mapping\n");
> +	}
> +
>  	ret_data = of_property_read_u32_array(endpoint, "ti,lvds-vod-swing-data-microvolt",
>  					lvds_vod_swing_data, ARRAY_SIZE(lvds_vod_swing_data));

[Severity: Medium]
If the "data-lanes" property exists but is malformed (for example, containing an
incorrect number of elements and returning -EOVERFLOW), ret_data will be
non-zero and the error is ignored. The ret_data variable is then immediately
overwritten by the next property read.

Should we check for error codes other than -EINVAL (which indicates the optional
property is absent) and return an error, rather than silently ignoring malformed
device tree properties?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260721071253.1098652-1-wojciech.dubowik@mt.com?part=3

      reply	other threads:[~2026-07-21  7:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  7:12 [PATCH v6 0/3] drm/bridge: ti-sn65dsi83: Add reverse lvds lanes support Wojciech Dubowik
2026-07-21  7:12 ` [PATCH v6 1/3] drm/bridge: ti-sn65dsi83: Simplify error condition logic Wojciech Dubowik
2026-07-21  7:12 ` [PATCH v6 2/3] dt-bindings: display: sn65dsi83: Add output data-lanes property Wojciech Dubowik
2026-07-21  7:20   ` sashiko-bot
2026-07-21 14:50     ` Rob Herring
2026-07-21  7:27   ` Krzysztof Kozlowski
2026-07-21 14:55     ` Rob Herring
2026-07-21  7:12 ` [PATCH v6 3/3] drm/bridge: ti-sn65dsi83: Add reversed lvds lanes support Wojciech Dubowik
2026-07-21  7:21   ` sashiko-bot [this message]

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=20260721072124.9A55A1F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wojciech.dubowik@mt.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.