Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbaFXLdi (ORCPT ); Tue, 24 Jun 2014 07:33:38 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:48550 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbaFXLde (ORCPT ); Tue, 24 Jun 2014 07:33:34 -0400 Message-ID: <1403609569.10831.0.camel@jlt4.sipsolutions.net> Subject: Re: [PATCH 00/22] Add and use pci_zalloc_consistent From: Johannes Berg To: Julian Calaby Cc: Joe Perches , "Luis R. Rodriguez" , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "devel@driverdev.osuosl.org" , linux-arch@vger.kernel.org, linux-scsi , iss_storagedev@hp.com, linux-rdma@vger.kernel.org, netdev , linux-atm-general@lists.sourceforge.net, linux-wireless , dri-devel@lists.freedesktop.org, linux-crypto@vger.kernel.org, linux-eata@i-connect.net, linux-media@vger.kernel.org Date: Tue, 24 Jun 2014 13:32:49 +0200 In-Reply-To: (sfid-20140624_012812_032630_4B31BBC9) References: <20140623172512.GA1390@garbanzo.do-not-panic.com> <1403550809.15811.13.camel@joe-AO725> (sfid-20140624_012812_032630_4B31BBC9) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2014-06-24 at 09:27 +1000, Julian Calaby wrote: > > - x = (T)pci_alloc_consistent(E1,E2,E3); > > + x = pci_zalloc_consistent(E1,E2,E3); > > if ((x==NULL) || ...) S > > - memset((T2)x,0,E2); > > I don't know much about SmPL, but wouldn't having that if statement > there reduce your matches? Code that matched without the if statement would be buggy, since it wouldn't be checking the pci_zalloc_consistent return value properly.l johannes -- 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/