From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261492AbVGGRdA (ORCPT ); Thu, 7 Jul 2005 13:33:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261473AbVGGRal (ORCPT ); Thu, 7 Jul 2005 13:30:41 -0400 Received: from ns.virtualhost.dk ([195.184.98.160]:16310 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S261442AbVGGR3l (ORCPT ); Thu, 7 Jul 2005 13:29:41 -0400 Date: Thu, 7 Jul 2005 19:31:03 +0200 From: Jens Axboe To: Christoph Lameter Cc: Linus Torvalds , Andi Kleen , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [another PATCH] Fix crash on boot in kmalloc_node IDE changes Message-ID: <20050707173103.GK24401@suse.de> References: <20050706133052.GF21330@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 07 2005, Christoph Lameter wrote: > On Thu, 7 Jul 2005, Linus Torvalds wrote: > > > If you make it use a trivial inline function for the thing, I think that > > would be ok, though. > > Like this? > > Index: linux-2.6.git/drivers/ide/ide-probe.c > =================================================================== > --- linux-2.6.git.orig/drivers/ide/ide-probe.c 2005-06-23 11:38:02.000000000 -0700 > +++ linux-2.6.git/drivers/ide/ide-probe.c 2005-07-07 10:22:02.000000000 -0700 > @@ -960,6 +960,15 @@ > } > #endif /* MAX_HWIFS > 1 */ > > +static inline int hwif_to_node(ide_hwif_t *hwif) > +{ > + if (hwif && hwif->pci_dev) > + return pcibus_to_node(hwif->pci_dev->bus); > + else > + /* Add ways to determine the node of other busses here */ > + return -1; > +} When is hwif ever NULL? -- Jens Axboe