From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4S4P-00017T-AL for barebox@lists.infradead.org; Tue, 08 Jul 2014 09:52:18 +0000 Date: Tue, 8 Jul 2014 11:51:53 +0200 From: Sascha Hauer Message-ID: <20140708095153.GW23235@pengutronix.de> References: <1404422826-6589-1-git-send-email-antonynpavlov@gmail.com> <1404422826-6589-4-git-send-email-antonynpavlov@gmail.com> <20140707182210.GC19147@ns203013.ovh.net> <20140708012346.2b0e75d53710d0dc68d5afac@gmail.com> <20140708062934.GB23282@pengutronix.de> <20140708134843.b279bb1f96ebae8cbedd1ace@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140708134843.b279bb1f96ebae8cbedd1ace@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v5 3/7] PCI: initial commit To: Antony Pavlov Cc: barebox@lists.infradead.org On Tue, Jul 08, 2014 at 01:48:43PM +0400, Antony Pavlov wrote: > On Tue, 8 Jul 2014 08:29:34 +0200 > Sascha Hauer wrote: > > > On Tue, Jul 08, 2014 at 01:23:46AM +0400, Antony Pavlov wrote: > > > On Mon, 7 Jul 2014 20:22:10 +0200 > > > Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > > > > > +static struct pci_bus *pci_alloc_bus(void) > > > > > +{ > > > > > + struct pci_bus *b; > > > > > + > > > > > + b = kzalloc(sizeof(*b), GFP_KERNEL); > > > > > > > > if (!b) > > > > return b; > > > > > > kzalloc() eventually calls xmalloc(). > > > xmalloc() calls panic() if malloc fails, so there is no need to check b at all. > > > > Then let's use xzalloc directly here. I think only the x functions > > should panic on failure. kzalloc should be implemented with > > malloc or calloc. > > The PCI series consist much code from original August 2011 patchseries > (e.g. see http://lists.infradead.org/pipermail/barebox/2011-August/004349.html). > > Some things have changed since 2011. > > I'll prepare fix patches. > Can we ammend them into the PCI patch series (already in the 'next' but not in the 'master'?) The PCI support is in master, no chance to fixup. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox