Re: [PATCH 0/3 v2] Replace OBD_CPT_ALLOC etc by kzalloc_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All three are good from my perspective.
Thanks!

On May 3, 2015, at 10:07 AM, Julia Lawall wrote:

> The complete semantic patch used to make this transformation is as follows:
> (http://coccinelle.lip6.fr/).
> 
> // <smpl>
> @@
> expression ptr,cptab,cpt,size,gfp;
> @@
> 
> - OBD_CPT_ALLOC_GFP(ptr, cptab, cpt, size, gfp)
> + ptr = kzalloc_node(size, gfp, cfs_cpt_spread_node(cptab, cpt))
> 
> @@
> expression ptr,cptab,cpt,size;
> @@
> 
> - OBD_CPT_ALLOC(ptr, cptab, cpt, size)
> + ptr = kzalloc_node(size, GFP_NOFS, cfs_cpt_spread_node(cptab, cpt))
> 
> @@
> expression ptr,cptab,cpt;
> @@
> 
> - OBD_CPT_ALLOC_PTR(ptr, cptab, cpt)
> + ptr = kzalloc_node(sizeof(*ptr), GFP_NOFS, cfs_cpt_spread_node(cptab,cpt))
> // </smpl>
> 
> Note that the previously proposed patch "Add obd_cpt_alloc function" is not
> needed, as the transformation is done without adding a new function.
> 
> These patches should be applied after the patches with subjects "Use
> kzalloc and kfree" and "remove unneeded null test before free".
> 
> v2 makes the subject lines more uniform.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux