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;
+}
+
/*
* init request queue
*/
@@ -978,8 +987,7 @@
* do not.
*/
- q = blk_init_queue_node(do_ide_request, &ide_lock,
- pcibus_to_node(drive->hwif->pci_dev->bus));
+ q = blk_init_queue_node(do_ide_request, &ide_lock, hwif_to_node(hwif));
if (!q)
return 1;
@@ -1097,7 +1105,7 @@
spin_unlock_irq(&ide_lock);
} else {
hwgroup = kmalloc_node(sizeof(ide_hwgroup_t), GFP_KERNEL,
- pcibus_to_node(hwif->drives[0].hwif->pci_dev->bus));
+ hwif_to_node(hwif->drives[0].hwif));
if (!hwgroup)
goto out_up;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|