[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220311025920.GA1346668@anxtwsw-Precision-3640-Tower>
Date: Fri, 11 Mar 2022 10:59:20 +0800
From: Xin Ji <xji@...logixsemi.com>
To: Sam Ravnborg <sam@...nborg.org>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, qwen@...logixsemi.com,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
mliu@...logixsemi.com, hsinyi@...omium.org, bliang@...logixsemi.com
Subject: Re: [PATCH] drm/bridge: anx7625: Fix not correct get property counts
On Thu, Mar 10, 2022 at 07:53:59PM +0100, Sam Ravnborg wrote:
> Hi Xin,
>
> On Thu, Mar 10, 2022 at 05:16:53PM +0800, Xin Ji wrote:
> > The property length which returns from "of_get_property", divided by
> > sizeof(int) to get the total property counts.
> >
> > Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")
> >
> > Signed-off-by: Xin Ji <xji@...logixsemi.com>
> > ---
> > drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index c6a9a02ed762..87081d5b408d 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
> >
> > if (of_get_property(dev->of_node,
> > "analogix,lane0-swing", &num_regs)) {
> > + num_regs /= sizeof(int);
>
> Since the property is an array maybe use: of_property_read_u8_array()
>
> Sam
Hi Sam, OK, I'll use it to get property data.
Thanks,
Xin
Powered by blists - more mailing lists