From: Gabor Juhos <juhosg@openwrt.org>
To: Sergei Shtylyov <sshtylyov@mvista.com>
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 12:58:49 +0100 [thread overview]
Message-ID: <4ECA3CF9.8040109@openwrt.org> (raw)
In-Reply-To: <4ECA254E.4040509@mvista.com>
Hi Sergei,
2011.11.21. 11:17 keltezéssel, Sergei Shtylyov írta:
> 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.
>
<...>
>> }
>> +
>> +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?
Because I have more patches which will need the if-else statement. Apart from
that, you are right it is not needed here. I will remove it from the current patch.
-Gabor
next prev parent reply other threads:[~2011-11-21 11:58 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
2011-11-21 11:58 ` Gabor Juhos [this message]
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=4ECA3CF9.8040109@openwrt.org \
--to=juhosg@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=sshtylyov@mvista.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox