Re: [PATCH v6 2/3] drm: Add support for the LogiCVC display controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux