[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACvgo51mRse3su4exyTqXYJRPPc0VqaX9+tRyKUuBPtm5Q+6XQ@mail.gmail.com>
Date: Mon, 4 May 2020 14:28:47 +0100
From: Emil Velikov <emil.l.velikov@...il.com>
To: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Cc: ML dri-devel <dri-devel@...ts.freedesktop.org>,
devicetree <devicetree@...r.kernel.org>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
David Airlie <airlied@...ux.ie>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Rob Herring <robh+dt@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>
Subject: Re: [PATCH v6 2/3] drm: Add support for the LogiCVC display controller
Hi Paul,
Just had a casual quick look for custom KMS properties, since new
drivers made that mistake in the past.
Thanks for not including any o/
I made a couple of trivial suggestions - if you agree, feel free to
keep them as follow-up patches.
On Thu, 30 Apr 2020 at 20:28, Paul Kocialkowski
<paul.kocialkowski@...tlin.com> wrote:
> +int logicvc_of_property_parse_u32(struct device_node *of_node,
> + const char *name, u32 *target)
> +{
> + struct logicvc_of_property *property;
> + const char *string;
> + u32 value;
> + int ret;
> +
> + property = logicvc_of_property_lookup(name);
> + if (!property)
> + return -EINVAL;
> +
One could have the logicvc_of_properties[] entries indexed with the
logicvc_of_property_parse_{u32,bool} caller, using that instead of the
name string.
Aside: I suspect the array (as most other arrays in this patch) should
be annotated const, correct?
> + if (property->range[0] || property->range[1])
> + if (value < property->range[0] || value > property->range[1])
Combine the two ifs?
-Emil
Powered by blists - more mailing lists