mbox series

[0/4] use mmgrab

Message ID 1577634178-22530-1-git-send-email-Julia.Lawall@inria.fr (mailing list archive)
Headers show
Series use mmgrab | expand

Message

Julia Lawall Dec. 29, 2019, 3:42 p.m. UTC
Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab()
helper") and most of the kernel was updated to use it. Update a few
remaining files.

---

 arch/openrisc/kernel/smp.c          |    2 +-
 drivers/misc/cxl/context.c          |    2 +-
 drivers/vfio/pci/vfio_pci_nvlink2.c |    2 +-
 drivers/vfio/vfio_iommu_spapr_tce.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Dan Carpenter Jan. 3, 2020, 12:31 p.m. UTC | #1
On Sun, Dec 29, 2019 at 04:42:54PM +0100, Julia Lawall wrote:
> Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab()
> helper") and most of the kernel was updated to use it. Update a few
> remaining files.

I wonder if there is an automatic way to generate these kind of
Coccinelle scripts which use inlines instead of open coding.  Like maybe
make a list of one line functions, and then auto generate a recipe.  Or
the mmgrab() function could have multiple lines if the first few were
just sanity checks for NULL or something...

regards,
dan carpenter
Julia Lawall Jan. 3, 2020, 12:47 p.m. UTC | #2
On Fri, 3 Jan 2020, Dan Carpenter wrote:

> On Sun, Dec 29, 2019 at 04:42:54PM +0100, Julia Lawall wrote:
> > Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab()
> > helper") and most of the kernel was updated to use it. Update a few
> > remaining files.
>
> I wonder if there is an automatic way to generate these kind of
> Coccinelle scripts which use inlines instead of open coding.  Like maybe
> make a list of one line functions, and then auto generate a recipe.  Or
> the mmgrab() function could have multiple lines if the first few were
> just sanity checks for NULL or something...

I tried this at one point (10 years ago!):

https://pages.lip6.fr/Julia.Lawall/acp4is09-lawall.pdf

Perhaps it is worth reviving.

julia