<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jun 3, 2025 at 2:11 AM Geert Uytterhoeven <<a href="mailto:geert@linux-m68k.org">geert@linux-m68k.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Anusha,<br>
<br>
On Fri, 30 May 2025 at 20:28, Anusha Srivatsa <<a href="mailto:asrivats@redhat.com" target="_blank">asrivats@redhat.com</a>> wrote:<br>
> Move to using the new API devm_drm_panel_alloc() to allocate the<br>
> panel.<br>
><br>
> Reviewed-by: Neil Armstrong <<a href="mailto:neil.armstrong@linaro.org" target="_blank">neil.armstrong@linaro.org</a>><br>
> Signed-off-by: Anusha Srivatsa <<a href="mailto:asrivats@redhat.com" target="_blank">asrivats@redhat.com</a>><br>
<br>
Thanks for your patch!<br>
<br>
I have a generic comment that applies to all patches in the series.<br>
<br>
> --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c<br>
> +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c<br>
> @@ -424,9 +424,11 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi)<br>
>         struct otm8009a *ctx;<br>
>         int ret;<br>
><br>
> -       ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);<br>
<br>
The old code used sizeof(*ctx) instead of an explicit type, for<br>
increased type-safety.<br>
<br>
> -       if (!ctx)<br>
> -               return -ENOMEM;<br>
> +       ctx = devm_drm_panel_alloc(dev, struct otm8009a, panel,<br>
<br>
Can't you use __typeof(*ctx) instead of the explicit type here, too?<br>
<br></blockquote><div>Hi Geert,</div><div>Your suggestion does improve the patch for sure. The series along with its first two parts is already merged</div><div>and this change will have to go as a separate series.</div><div><br></div><div>Thanks,</div><div>Anusha</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +                                  &otm8009a_drm_funcs,<br>
> +                                  DRM_MODE_CONNECTOR_DSI);<br>
> +       if (IS_ERR(ctx))<br>
> +               return PTR_ERR(ctx);<br>
><br>
>         ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);<br>
>         if (IS_ERR(ctx->reset_gpio)) {<br>
<br>
Gr{oetje,eeting}s,<br>
<br>
                        Geert<br>
<br>
--<br>
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- <a href="mailto:geert@linux-m68k.org" target="_blank">geert@linux-m68k.org</a><br>
<br>
In personal conversations with technical people, I call myself a hacker. But<br>
when I'm talking to journalists I just say "programmer" or something like that.<br>
                                -- Linus Torvalds<br>
<br>
</blockquote></div></div>