From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Joshua Kinard <kumba@gentoo.org>, Ralf Baechle <ralf@linux-mips.org>
Cc: Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: [PATCH]: MIPS: PCI: Add pre_enable hook, minor readability fixes
Date: Mon, 25 May 2015 16:09:58 +0300 [thread overview]
Message-ID: <55631F26.6080108@cogentembedded.com> (raw)
In-Reply-To: <5562B60D.3050507@gentoo.org>
Hello.
On 5/25/2015 8:41 AM, Joshua Kinard wrote:
> From: Joshua Kinard <kumba@gentoo.org>
> This patch adds a hook "pre_enable", to the core MIPS PCI code. It is
> used by the IP30 Port to setup the PCI resources prior to probing the
> BRIDGE and detecting available PCI devices. It also adds some minor
> whitespace to improve readability.
> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
[...]
> diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
> index b8a0bf5..af17c16 100644
> --- a/arch/mips/pci/pci.c
> +++ b/arch/mips/pci/pci.c
> @@ -261,14 +261,19 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask)
> u16 cmd, old_cmd;
> int idx;
> struct resource *r;
> + struct pci_controller *hose = (struct pci_controller *)dev->sysdata;
>
> pci_read_config_word(dev, PCI_COMMAND, &cmd);
> old_cmd = cmd;
> - for (idx=0; idx < PCI_NUM_RESOURCES; idx++) {
> + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
> /* Only set up the requested stuff */
> - if (!(mask & (1<<idx)))
> + if (!(mask & (1 << idx)))
> continue;
>
> + if(hose->pre_enable)
> + if(hose->pre_enable(hose, dev, idx) < 0)
Space required after *if*; please run your patches thru scripts/checkpatch.pl.
WBR, Sergei
next prev parent reply other threads:[~2015-05-25 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-25 5:41 [PATCH]: MIPS: PCI: Add pre_enable hook, minor readability fixes Joshua Kinard
2015-05-25 13:09 ` Sergei Shtylyov [this message]
2015-05-25 16:45 ` Joshua Kinard
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=55631F26.6080108@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=kumba@gentoo.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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