* [PATCH] Remove never used pci_probe variable
@ 2008-04-18 15:34 Atsushi Nemoto
2008-07-07 16:14 ` Atsushi Nemoto
0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2008-04-18 15:34 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Nobody overwrite pci_probe. Remove it. Also make
pcibios_assign_all_busses weak so that platform code can overwrite it.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
arch/mips/pci/pci.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 0bd93fb..7533e3f 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -21,10 +21,6 @@
*/
int pci_probe_only;
-#define PCI_ASSIGN_ALL_BUSSES 1
-
-unsigned int pci_probe = PCI_ASSIGN_ALL_BUSSES;
-
/*
* The PCI controller list.
*/
@@ -222,9 +218,9 @@ void pcibios_set_master(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
-unsigned int pcibios_assign_all_busses(void)
+unsigned int __weak pcibios_assign_all_busses(void)
{
- return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
+ return 1;
}
int __weak pcibios_plat_dev_init(struct pci_dev *dev)
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Remove never used pci_probe variable
2008-04-18 15:34 [PATCH] Remove never used pci_probe variable Atsushi Nemoto
@ 2008-07-07 16:14 ` Atsushi Nemoto
2008-08-27 9:19 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2008-07-07 16:14 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Nobody overwrite pci_probe. Remove it. Also make
pcibios_assign_all_busses weak so that platform code can overwrite it.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
Revised against current linux-queue tree.
arch/mips/pci/pci.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 9dd6e01..a3dcfd4 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -21,10 +21,6 @@
*/
int pci_probe_only;
-#define PCI_ASSIGN_ALL_BUSSES 1
-
-unsigned int pci_probe = PCI_ASSIGN_ALL_BUSSES;
-
/*
* The PCI controller list.
*/
@@ -221,9 +217,9 @@ void pcibios_set_master(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
-unsigned int pcibios_assign_all_busses(void)
+unsigned int __weak pcibios_assign_all_busses(void)
{
- return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
+ return 1;
}
int __weak pcibios_plat_dev_init(struct pci_dev *dev)
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Remove never used pci_probe variable
2008-07-07 16:14 ` Atsushi Nemoto
@ 2008-08-27 9:19 ` Ralf Baechle
2008-08-27 13:22 ` Atsushi Nemoto
2008-08-27 21:40 ` Thomas Bogendoerfer
0 siblings, 2 replies; 5+ messages in thread
From: Ralf Baechle @ 2008-08-27 9:19 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Tue, Jul 08, 2008 at 01:14:26AM +0900, Atsushi Nemoto wrote:
> Nobody overwrite pci_probe. Remove it. Also make
> pcibios_assign_all_busses weak so that platform code can overwrite it.
> diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
> index 9dd6e01..a3dcfd4 100644
> --- a/arch/mips/pci/pci.c
> +++ b/arch/mips/pci/pci.c
> @@ -21,10 +21,6 @@
> */
> int pci_probe_only;
>
> -#define PCI_ASSIGN_ALL_BUSSES 1
> -
> -unsigned int pci_probe = PCI_ASSIGN_ALL_BUSSES;
> -
> /*
> * The PCI controller list.
> */
> @@ -221,9 +217,9 @@ void pcibios_set_master(struct pci_dev *dev)
> pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
> }
>
> -unsigned int pcibios_assign_all_busses(void)
> +unsigned int __weak pcibios_assign_all_busses(void)
> {
> - return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
> + return 1;
> }
>
> int __weak pcibios_plat_dev_init(struct pci_dev *dev)
I think real problem here is that we have two variables which both serve the
same purpose, pci_probe_only and pci_probe, no? Not entirely sure here
because the alpha defines:
arch/alpha/include/asm/pci.h:#define pcibios_assign_all_busses() 1
yet it has pci_probe_only ...
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Remove never used pci_probe variable
2008-08-27 9:19 ` Ralf Baechle
@ 2008-08-27 13:22 ` Atsushi Nemoto
2008-08-27 21:40 ` Thomas Bogendoerfer
1 sibling, 0 replies; 5+ messages in thread
From: Atsushi Nemoto @ 2008-08-27 13:22 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
On Wed, 27 Aug 2008 10:19:35 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> I think real problem here is that we have two variables which both serve the
> same purpose, pci_probe_only and pci_probe, no? Not entirely sure here
> because the alpha defines:
>
> arch/alpha/include/asm/pci.h:#define pcibios_assign_all_busses() 1
>
> yet it has pci_probe_only ...
I'm not sure pci_probe and pci_probe_only have same purpose... My
patch is just an cleanup and does not change current behaviour.
Real users of pci_probe_only might have some opinions ;)
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Remove never used pci_probe variable
2008-08-27 9:19 ` Ralf Baechle
2008-08-27 13:22 ` Atsushi Nemoto
@ 2008-08-27 21:40 ` Thomas Bogendoerfer
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2008-08-27 21:40 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips
On Wed, Aug 27, 2008 at 10:19:35AM +0100, Ralf Baechle wrote:
> I think real problem here is that we have two variables which both serve the
> same purpose, pci_probe_only and pci_probe, no? Not entirely sure here
> because the alpha defines:
>
> arch/alpha/include/asm/pci.h:#define pcibios_assign_all_busses() 1
>
> yet it has pci_probe_only ...
as I found no code overwriting pci_probe under arch/mips, we could
remove pci_probe and use the same #define as alpha does.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-27 21:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 15:34 [PATCH] Remove never used pci_probe variable Atsushi Nemoto
2008-07-07 16:14 ` Atsushi Nemoto
2008-08-27 9:19 ` Ralf Baechle
2008-08-27 13:22 ` Atsushi Nemoto
2008-08-27 21:40 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox