Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752341AbcD2VNq (ORCPT ); Fri, 29 Apr 2016 17:13:46 -0400 Received: from mail-bl2nam02on0055.outbound.protection.outlook.com ([104.47.38.55]:19296 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751679AbcD2VNp (ORCPT ); Fri, 29 Apr 2016 17:13:45 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Date: Fri, 29 Apr 2016 14:13:25 -0700 From: =?utf-8?B?U8O2cmVu?= Brinkmann To: Julia Lawall CC: Dan Williams , , Vinod Koul , "Michal Simek" , , , Subject: Re: [PATCH 2/5] dmaengine: vdma: Use dma_pool_zalloc Message-ID: <20160429211325.GB3766@xsjsorenbubuntu> References: <1461960552-7429-1-git-send-email-Julia.Lawall@lip6.fr> <1461960552-7429-3-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1461960552-7429-3-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.24 (2015-08-30) X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22290.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(24454002)(377424004)(189002)(189998001)(77096005)(5008740100001)(2870700001)(23676002)(110136002)(586003)(19580405001)(19580395003)(36386004)(106466001)(86362001)(47776003)(63266004)(4001350100001)(76506005)(1096002)(57986006)(1220700001)(9786002)(92566002)(2906002)(81166005)(1076002)(33716001)(33656002)(11100500001)(9686002)(87936001)(15975445007)(6806005)(85202003)(85182001)(50986999)(2950100001)(76176999)(54356999)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1NAM02HT129;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 553b885f-dd0a-4d6c-3ad8-08d3707324ad X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:CY1NAM02HT129; X-Microsoft-Antispam-PRVS: <93b2618effeb4bf492f2dec536bc4c7f@CY1NAM02HT129.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(13024025)(5005006)(13023025)(13017025)(13018025)(8121501046)(13015025)(3002001)(10201501046)(6055026);SRVR:CY1NAM02HT129;BCL:0;PCL:0;RULEID:;SRVR:CY1NAM02HT129; X-Forefront-PRVS: 0927AA37C7 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2016 21:13:42.4191 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT129 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 559 Lines: 22 On Fri, 2016-04-29 at 22:09:09 +0200, Julia Lawall wrote: > Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch > that makes this transformation is as follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression d,e; > statement S; > @@ > > d = > - dma_pool_alloc > + dma_pool_zalloc > (...); > if (!d) S > - memset(d, 0, sizeof(*d)); > // > > Signed-off-by: Julia Lawall Acked-by: Sören Brinkmann Sören