lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=U6WdxD4g-4rA2Kz0nbs3fZUA+NRzivg_tJMup0652MxQ@mail.gmail.com>
Date: Tue, 9 Jul 2024 13:55:39 -0700
From: Doug Anderson <dianders@...omium.org>
To: Tejas Vipin <tejasvipin76@...il.com>
Cc: neil.armstrong@...aro.org, quic_jesszhan@...cinc.com, 
	maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de, 
	airlied@...il.com, daniel@...ll.ch, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, LinusW <linus.walleij@...aro.org>, 
	Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Subject: Re: [PATCH 1/2] drm/mipi-dsi: add more multi functions for better
 error handling

Hi,

On Tue, Jul 9, 2024 at 4:18 AM Tejas Vipin <tejasvipin76@...il.com> wrote:
>
> On 7/9/24 5:50 AM, Doug Anderson wrote:
> > Hi,
> >
> > On Fri, Jun 28, 2024 at 11:25 AM Tejas Vipin <tejasvipin76@...il.com> wrote:
> >>
> >> +/**
> >> + * mipi_dsi_dcs_set_page_address_multi() - define the column extent of the
> >> + *     frame memory accessed by the host processor
> >> + * @ctx: Context for multiple DSI transactions
> >> + * @start: first column of frame memory
> >> + * @end: last column of frame memory
> >
> > nit: "start" and "end" comments should say "first page" and "last
> > page", not "first column" and "last column". The previous function was
> > the one about columns.
> >
> >> + *
> >> + * Like mipi_dsi_dcs_set_page_address() but deals with errors in a way that
> >> + * makes it convenient to make several calls in a row.
> >> + */
> >> +void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx,
> >> +                                          u16 start, u16 end)
> >
> > nit: indentation of the above line isn't _quite_ right.
> >
> >
> > Other than the two nits, this looks fine to me, but I'd prefer if
> > someone else provides an "Ack" in addition to me that they're OK
> > adding these extra "multi" functions. Both Dmitry and Linus W were
> > involved in the original "multi" functions, so maybe they'd be willing
> > to offer their opinions?
>
> I think a better way to go forward with multi style functions is to
> use macros. All the multi style functions are basically exactly the
> same with the only difference being the function called internally
> and the dev_err. This can be represented in the form of a macro, and
> would save on a ton of otherwise redundant code, while also allowing
> us to "convert" any function to multi style as and when we please.
>
> We would ideally have 2 macros, one for the main functions where we
> desire to modify accum_err on an error arising, and another macro that
> just checks accum_err to see if the function should be a no op.
>
> If you guys think this is a good idea, I'll work on the macros and
> do the multi conversions in this new way.

I had a similar thought but I wasn't sure how easy it would be. If you
want to prototype it out and send out patches if they look good then
that'd be nice. We'd want to make sure that we actually generate
functions for the "multi" variants since we don't want all that inline
code on every caller, but generating those functions with a macro does
seem like it would work. I guess you'd also need to include some sort
of string for use in the error messages.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ