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>] [day] [month] [year] [list]
Message-ID: <CAD=FV=WJDHAdDCD=Mhffawuz8U7=MkzDueXmAvKpJ-o5eOT6DQ@mail.gmail.com>
Date: Wed, 12 Mar 2025 17:21:46 -0700
From: Doug Anderson <dianders@...omium.org>
To: Anusha Srivatsa <asrivats@...hat.com>
Cc: Maxime Ripard <mripard@...hat.com>, Maxime Ripard <mripard@...nel.org>, 
	Michael Trimarchi <michael@...rulasolutions.com>, Neil Armstrong <neil.armstrong@...aro.org>, 
	Jessica Zhang <quic_jesszhan@...cinc.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Thomas Zimmermann <tzimmermann@...e.de>, 
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, 
	Tejas Vipin <tejasvipin76@...il.com>
Subject: Re: [PATCH v2] drm/panel/synaptics-r63353: Use _multi variants

Hi,

On Wed, Mar 12, 2025 at 5:00 PM Anusha Srivatsa <asrivats@...hat.com> wrote:
>
>
>
> On Wed, Mar 12, 2025 at 11:48 AM Doug Anderson <dianders@...omium.org> wrote:
>>
>> Hi,
>>
>> On Wed, Mar 12, 2025 at 8:06 AM Anusha Srivatsa <asrivats@...hat.com> wrote:
>> >
>> >> > @@ -106,53 +107,46 @@ static int r63353_panel_power_off(struct r63353_panel *rpanel)
>> >> >  static int r63353_panel_activate(struct r63353_panel *rpanel)
>> >> >  {
>> >> >       struct mipi_dsi_device *dsi = rpanel->dsi;
>> >> > -     struct device *dev = &dsi->dev;
>> >> > -     int i, ret;
>> >> > +     struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>> >> > +     int i;
>> >> >
>> >> > -     ret = mipi_dsi_dcs_soft_reset(dsi);
>> >> > -     if (ret < 0) {
>> >> > -             dev_err(dev, "Failed to do Software Reset (%d)\n", ret);
>> >> > +     mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);
>> >> > +     if (dsi_ctx.accum_err)
>> >> >               goto fail;
>> >> > -     }
>> >>
>> >> This changes was definitely not what the script is doing.
>> >
>> >
>> > It isnt. Using coccinelle for the major part of pattern matching and replacing the newer _multi variant API. Some handling (including a newline that it introduces) and  the returns depend on a case by case basis, which had to be done manually.
>>
>> ...and now you're getting to see why I didn't think a coccinelle
>> script could fully handle this task. ;-) IMO instead of trying to get
>> a coccinelle script to do the full conversion, the right approach
>> would be to use a coccinelle script (or equivalent) to get the basics
>> done (just so you don't make any typos) and then cleanup the result
>> manually. Spending more time on the coccinelle script than it would
>> take to do the conversion manually is probably not the right approach.
>>
>> If your patch wasn't fully generated by a coccinelle script you should
>> document that in the commit message. Something like "Initial patch was
>> generated by a coccinelle script and the result was cleaned up
>> manually." If the script is too long to fit in the commit message,
>> it's fine to put it somewhere online and provide a link. "Somewhere
>> online" could easily be a mailing list post.
>>
>
> You know I have been thinking if it makes sense to have this script merged to coccinelle project and add those details in the commit log.... Was having an offline discussion with  @Maxime Ripard today and he rightly pointed out that since it is too specific, once all the conversions are done , the script  would not be further useable....
> About having the script online and providing a link, something link a github link?

That feels overkill. It seems like you could just send an email to
LKML or dri-devel and then link it that way. It could be in reply to
this thread or a totally separate email. lore.kernel.org links are
great.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ