Re: patches

Julia Lawall <[email protected]> Wed, 2 Apr 2025 09:22:01 +0200 (CEST)
Newsgroups dev.linux.lists.outreachy
Message-ID <[email protected]>
> 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.

> > 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.

julia

> Thanks
>
> Adekunle
>