Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751714AbbECOQA (ORCPT ); Sun, 3 May 2015 10:16:00 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:20843 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbbECOP6 (ORCPT ); Sun, 3 May 2015 10:15:58 -0400 X-IronPort-AV: E=Sophos;i="5.13,360,1427752800"; d="scan'208";a="138719313" From: Julia Lawall To: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, devel@driverdev.osuosl.org, HPDD-discuss@ml01.01.org, Greg Kroah-Hartman , Andreas Dilger , Oleg Drokin Subject: [PATCH 0/3 v2] Replace OBD_CPT_ALLOC etc by kzalloc_node Date: Sun, 3 May 2015 16:07:16 +0200 Message-Id: <1430662039-26557-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1146 Lines: 38 The complete semantic patch used to make this transformation is as follows: (http://coccinelle.lip6.fr/). // @@ 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)) // 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/