devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu-I3yL/QOVVjH10XsdtD+oqA@public.gmane.org>
To: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Liviu Dudau <Liviu.Dudau-5wv7dgnIgG8@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-arm
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] of/pci: add pci_pio_to_address dummy for !CONFIG_OF
Date: Tue, 30 Sep 2014 22:28:55 +0100	[thread overview]
Message-ID: <20140930212855.GA15713@borg.dudau.co.uk> (raw)
In-Reply-To: <CAErSpo61favodLTSwCYzFZq-sB60+ZH6_WvwSGHgRx6cPKtXpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Sep 30, 2014 at 01:53:06PM -0600, Bjorn Helgaas wrote:
> On Tue, Sep 30, 2014 at 11:10 AM, Liviu Dudau <liviu-I3yL/QOVVjH10XsdtD+oqA@public.gmane.org> wrote:
> > On Tue, Sep 30, 2014 at 10:01:39AM -0600, Bjorn Helgaas wrote:
> >> On Tue, Sep 30, 2014 at 03:19:05PM +0200, Arnd Bergmann wrote:
> >> > The pci_register_io_range() and pci_pio_to_address() were recently
> >> > introduced to generalize the handling of memory mapped PCI I/O space,
> >> > but they are only valid when CONFIG_OF is set, leading to a possible
> >> > build error:
> >> >
> >> > drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_setup_window':
> >> > drivers/pci/host/pcie-rcar.c:340:3: error: implicit declaration of function 'pci_pio_to_address' [-Werror=implicit-function-declaration]
> >> >    res_start = pci_pio_to_address(res->start);
> >> >    ^
> >> > drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_probe':
> >> > drivers/pci/host/pcie-rcar.c:945:3: error: implicit declaration of function 'of_pci_range_to_resource' [-Werror=implicit-function-declaration]
> >> >    err = of_pci_range_to_resource(&range, pdev->dev.of_node,
> >> >    ^
> >> > cc1: some warnings being treated as errors
> >> >
> >> > This provides inline dummy implementations for the case that
> >> > CONFIG_OF is disabled, to allow better build testing.
> >> >
> >> > Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> >> > Fixes: 279c5dd046 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()")
> >>
> >> I'm rebuilding the pci/host-generic branch to pick up the other v13 fixes,
> >> so I folded this fix directly into the "of/pci: Add pci_register_io_range()
> >> and pci_pio_to_address()" patch.  Thanks for finding this; the config
> >> dependencies are a bit of a mess.
> >
> > Bjorn,
> >
> > I suggest splitting this patch into 2 parts, move the one that adds pci_pio_to_address() in patch 2
> > and the other in patch 5.
> 
> Yeah, I screwed that up.  I had just applied Arnd's patch completely
> to 279c5dd046, which doesn't quite make sense.
> 
> I tried again like this:
> 
>   - In "of/pci: Add pci_register_io_range() and pci_pio_to_address()",
> I added the dummy pci_pio_to_address(), so there's an extern and a
> definition in address.c when CONFIG_OF_ADDRESS=y, and an inline dummy
> otherwise.
> 
>   - I dropped "of/pci: Define of_pci_range_to_resource() only when
> CONFIG_PCI=y".
> 
>   - In "of/pci: Move of_pci_range_to_resource() to of/address.c", I
> added the dummy of_pci_range_to_resource(), so there's an extern an a
> definition in address.c when CONFIG_OF_ADDRESS=y and CONFIG_PCI=y, and
> an inline dummy otherwise.
> 
> I'm not really set up to build test this, and my head is swimming a
> bit, so I hope this is it.  I pushed the pci/host-generic branch
> again, so you can look at it yourself.

Hi Bjorn,

It looks good to me. Functionality-wise I can only test it tomorrow UK time,
but from the diffs I've done I thinks we're good.

Will wait for more reports from the build bot.

Take care,
Liviu

> 
> Bjorn
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-09-30 21:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 13:19 [PATCH] of/pci: add pci_pio_to_address dummy for !CONFIG_OF Arnd Bergmann
2014-09-30 14:45 ` Liviu Dudau
2014-09-30 15:15   ` Arnd Bergmann
2014-09-30 15:42     ` Liviu Dudau
2014-09-30 15:54       ` Arnd Bergmann
2014-09-30 16:01 ` Bjorn Helgaas
     [not found]   ` <20140930160139.GA5625-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-09-30 17:10     ` Liviu Dudau
2014-09-30 19:53       ` Bjorn Helgaas
     [not found]         ` <CAErSpo61favodLTSwCYzFZq-sB60+ZH6_WvwSGHgRx6cPKtXpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-30 21:28           ` Liviu Dudau [this message]
2014-10-01  8:54 ` Liviu Dudau

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=20140930212855.GA15713@borg.dudau.co.uk \
    --to=liviu-i3yl/qovvjh10xsdtd+oqa@public.gmane.org \
    --cc=Liviu.Dudau-5wv7dgnIgG8@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).