Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbbECQPd (ORCPT ); Sun, 3 May 2015 12:15:33 -0400 Received: from mga02.intel.com ([134.134.136.20]:19547 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbbECQP0 convert rfc822-to-8bit (ORCPT ); Sun, 3 May 2015 12:15:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,361,1427785200"; d="scan'208";a="719952964" From: "Drokin, Oleg" To: Julia Lawall CC: "" , "" , "" , "" , Greg Kroah-Hartman , "Dilger, Andreas" Subject: Re: [PATCH 0/3 v2] Replace OBD_CPT_ALLOC etc by kzalloc_node Thread-Topic: [PATCH 0/3 v2] Replace OBD_CPT_ALLOC etc by kzalloc_node Thread-Index: AQHQhauulLxbO+3LtUm9p8H0nohaUp1q4tYA Date: Sun, 3 May 2015 16:15:23 +0000 Message-ID: <6D85B40F-811A-4226-BD79-C76C2BC31EA9@intel.com> References: <1430662039-26557-1-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1430662039-26557-1-git-send-email-Julia.Lawall@lip6.fr> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.185.16] Content-Type: text/plain; charset="us-ascii" Content-ID: <6EA928F5A1E0A640A40F06D602EEF510@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1312 Lines: 44 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/). > > // > @@ > 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/