Re: [PATCH] [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const

2008-04-08 Thread Benjamin Herrenschmidt
On Tue, 2008-04-08 at 19:19 -0700, Trent Piepho wrote: > Why? Because: > A) It's not modified and so it can be made const. const is good. > B) If one has a function that was given a const pci_bus pointer and you > want to get a pointer to its pci_controller, you'll get a warning from gcc > when

[PATCH] [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const

2008-04-08 Thread Trent Piepho
Why? Because: A) It's not modified and so it can be made const. const is good. B) If one has a function that was given a const pci_bus pointer and you want to get a pointer to its pci_controller, you'll get a warning from gcc when you use pci_bus_to_host(). This is the right way to stop that war