Re: patches

Samuel Abraham <[email protected]> Wed, 2 Apr 2025 08:30:21 +0100
Newsgroups dev.linux.lists.outreachy
Message-ID <CADYq+fZkv4YXbkPgFFbJu_Y67U8=dE52-Bbo6JqwmkQ2+hcYBw@mail.gmail.com>
On Wed, Apr 2, 2025 at 8:22 AM Julia Lawall <[email protected]> wrote:
>
> > Please do you mean we can run some checks on drivers just like check patch?
>
> Yes.
>
> > I saw the coccicheck binary in the scripts/ directory but I am not
> > sure how to run it
> > on a driver if that is what it is meant for.
> > Could you please provide some guidance?
>
> I previously sent a link to some coccinelle semantic patches that I think
> can be useful for staging drivers.  Just put one in a file, say sp.cocci,
> and then run spatch sp.cocci drivers/staging --very-quiet.  You can also
> mention a specific file.  It is nto necessary to use make coccicheck.

Okay, I already tested this on some drivers previously.
Thanks for the clarity
>
> > > not necessary to send such patches at a large scale.  Working on one file
> > > at a time is fine.
> >
> > Also, I would like to ask that when a driver is eventually transformed
> > using Coccinelle,
> > how do we indicate in the commit message that the suggestion and the
> > transformation
> > was done using coccinelle just like we do for checkpatch?
>
> Ideally, you could include the semantic patch, particularly if you are
> makign a patch series; then you can put it in the cover letter.  If the
> semantc patch is quite large, then putting it in an actual patch may be
> overwhelming.  So you could just say Found using Coccinelle.  If it is
> small enough, or can be simplified to be small enough, then it can give
> the maintainer some information about the reasoning that went into
> creating the patch.
>
Thank you very much
It is clear now.

Adekunle