From: Deepak R Varma <drv@mailo.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: outreachy@lists.linux.dev
Subject: Re: Coccinelle based patch processing
Date: Tue, 1 Nov 2022 22:27:02 +0530 [thread overview]
Message-ID: <Y2FP3mIVHll0tvQN@ubunlion> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2211011628340.2834@hadrien>
On Tue, Nov 01, 2022 at 04:28:50PM +0100, Julia Lawall wrote:
>
>
> On Tue, 1 Nov 2022, Deepak R Varma wrote:
>
> > On Tue, Nov 01, 2022 at 04:09:33PM +0100, Julia Lawall wrote:
> > >
> > >
> > > On Tue, 1 Nov 2022, Deepak R Varma wrote:
> > >
> > > > On Tue, Nov 01, 2022 at 03:34:52PM +0100, Julia Lawall wrote:
> > > > >
> > > > >
> > > > > On Tue, 1 Nov 2022, Deepak R Varma wrote:
> > > > >
> > > > > > Hello,
> > > > > > I have a coccicheck produced patch [attached here] using the following command.
> > > > > > Can you please suggest how to submit this as a patch? Is there a document that I
> > > > > > can follow to accomplish the submission?
> > > > > >
> > > > > > make coccicheck COCCI=./scripts/coccinelle/misc/returnvar.cocci M=driver/staging/r8188eu/ MODE=patch
> > > > >
> > > > > Do what you would have done if you had made the patch by hand.
> > > > You mean:
> > > > 1) review and implement the patch suggested changes manually onto my local
> > > > patch branch
> > >
> > > I don't understand what you mean by "implement ... manually". Coccinelle
> > > gives you a patch. YOu can just apply that patch to your tree. There is
> > > no need to change anything manually.
> >
> > Thank you Julia. I was not aware of the "git apply" feature. Never used it in
> > the past. Now I know.
>
> You can also just use patch -p1 < thepatch
That was super easy! Thank you Julia. I just submitted the patch for review and
feedback.
./drv
>
> julia
>
> >
> > Thank you again!
> > ./drv
> >
> > >
> > > But then you should look at the changes carefully in the context in which
> > > they occur, to determine whether they are correct, or you should do
> > > something else.
> > >
> > > You can also study the provided patch itself and remove changes to any
> > > file that do not seem suitable.
> > >
> > > > 2) build
> > > > 3) commit
> > > > 4) generate and send patch using mutt format-patch
> > >
> > > Yes.
> > >
> > > > Or is simply do a "mutt -H cocci-auto.patch" and add the subject and patch log
> > > > at the time of compiling the email?
> > >
> > > No.
> > >
> > > julia
> > >
> > > > In the later case, I am not building the driver to ensure the changes are
> > > > accurate.
> > > >
> > > > Can you please comment.
> > > >
> > > > >
> > > > > If the changes are quite identical, then you can group changes on multiple
> > > > > files into one.
> > > > >
> > > > > But in this case, even though all the changes do the same thing, it may
> > > > > not be a good idea to group them, because the context is different in each
> > > > > case. In particular, you should check each case to see whether the return
> > > > > variable really was unnecessary, or whether it actually was necessary, and
> > > > > the developer forgot to set it to something.
> > > >
> > > > Okay. I will review this once again before submitting the patch(es).
> > > >
> > > > ./drv
> > > >
> > > > >
> > > > > julia
> > > > >
> > > > >
> > > > > >
> > > > > > Thank you,
> > > > > > ./drv
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >
>
prev parent reply other threads:[~2022-11-01 16:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 14:14 Coccinelle based patch processing Deepak R Varma
2022-11-01 14:34 ` Julia Lawall
2022-11-01 14:52 ` Deepak R Varma
2022-11-01 15:09 ` Julia Lawall
2022-11-01 15:19 ` Deepak R Varma
2022-11-01 15:28 ` Julia Lawall
2022-11-01 16:57 ` Deepak R Varma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2FP3mIVHll0tvQN@ubunlion \
--to=drv@mailo.com \
--cc=julia.lawall@inria.fr \
--cc=outreachy@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.