linux-mips
[Top] [All Lists]

Re: [PATCH] Remove never used pci_probe variable

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] Remove never used pci_probe variable
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 27 Aug 2008 10:19:35 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20080708.011426.08077033.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080419.003435.26096353.anemo@mba.ocn.ne.jp> <20080708.011426.08077033.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
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

<Prev in Thread] Current Thread [Next in Thread>