From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Gabor Juhos <juhosg@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, Rene Bolldorf <xsecute@googlemail.com>
Subject: Re: [PATCH v3 4/7] MIPS: ath79: add a common PCI registration function
Date: Mon, 21 Nov 2011 14:17:50 +0400 [thread overview]
Message-ID: <4ECA254E.4040509@mvista.com> (raw)
In-Reply-To: <1321825151-16053-5-git-send-email-juhosg@openwrt.org>
Hello.
On 21-11-2011 1:39, Gabor Juhos wrote:
> The current code unconditionally registers the AR724X
> specific PCI controller, even if the kernel is running
> on a different SoC.
> Add a common function for PCI controller registration,
> and only register the AR724X PCI controller if the kernel
> is running on an AR724X SoC.
> Signed-off-by: Gabor Juhos<juhosg@openwrt.org>
> ---
> v3: - fix compile error if CONFIG_PCI is not defined
> - add __init annotation to ath79_register_pci
> v2: - no changes
[...]
> diff --git a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c
> index 4957428..342363b 100644
> --- a/arch/mips/ath79/pci.c
> +++ b/arch/mips/ath79/pci.c
> @@ -44,3 +46,15 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
>
> return PCIBIOS_SUCCESSFUL;
> }
> +
> +int __init ath79_register_pci(void)
> +{
> + int ret;
> +
> + if (soc_is_ar724x())
> + ret = ath724x_pcibios_init();
> + else
> + ret = -ENODEV;
Why not return right away and save 4 lines of code?
> +
> + return ret;
> +}
WBR, Sergei
next prev parent reply other threads:[~2011-11-21 10:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 21:39 [PATCH v3 0/7] MIPS: ath79: cleanup AR724X PCI support code Gabor Juhos
2011-11-20 21:39 ` [PATCH v3 1/7] MIPS: ath79: separate common PCI code Gabor Juhos
2011-11-21 13:53 ` René Bolldorf
2011-11-20 21:39 ` [PATCH v3 2/7] MIPS: ath79: rename pci-ath724x.h Gabor Juhos
2011-11-21 13:52 ` René Bolldorf
2011-11-20 21:39 ` [PATCH v3 3/7] MIPS: ath79: make ath724x_pcibios_init visible for external code Gabor Juhos
2011-11-21 10:19 ` Sergei Shtylyov
2011-11-21 11:53 ` Gabor Juhos
2011-11-21 13:58 ` René Bolldorf
2011-11-21 14:31 ` Ralf Baechle
2011-11-20 21:39 ` [PATCH v3 4/7] MIPS: ath79: add a common PCI registration function Gabor Juhos
2011-11-21 10:17 ` Sergei Shtylyov [this message]
2011-11-21 11:58 ` Gabor Juhos
2011-11-20 21:39 ` [PATCH v3 5/7] MIPS: ath79: rename pci-ath724x.c to make it reflect the real SoC name Gabor Juhos
2011-11-21 13:52 ` René Bolldorf
2011-11-20 21:39 ` [PATCH v3 6/7] MIPS: ath79: replace ath724x to ar724x Gabor Juhos
2011-11-21 13:55 ` René Bolldorf
2011-11-20 21:39 ` [PATCH v3 7/7] MIPS: ath79: use io-accessor macros in pci-ar724x.c Gabor Juhos
2011-11-21 13:54 ` René Bolldorf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECA254E.4040509@mvista.com \
--to=sshtylyov@mvista.com \
--cc=juhosg@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=xsecute@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.