lkml.org 
[lkml]   [2005]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [another PATCH] Fix crash on boot in kmalloc_node IDE changes
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

-
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/

\
 
 \ /
  Last update: 2005-07-07 19:40    [W:2.711 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site