From: Arnd Bergmann <arnd@arndb.de>
To: Liviu Dudau <liviu.dudau@arm.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Tomasz Nowicki <tn@semihalf.com>,
linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2 1/2] PCI: Add new method for registering PCI hosts
Date: Fri, 01 Jul 2016 16:24:50 +0200 [thread overview]
Message-ID: <6212651.41bebQZ9BM@wuerfel> (raw)
In-Reply-To: <20160701141447.GB8609@e106497-lin.cambridge.arm.com>
On Friday, July 1, 2016 3:14:47 PM CEST Liviu Dudau wrote:
>
> I'm confused. Why are we butchering the old pci_alloc_host_bridge() function
> to then go back and add re-add it in a different form?
Good point, we could just keep the existing implementation and make it
an exported function without the bus argument.
> The old pci_alloc_host_bridge() was doing mostly what the above
> function does minus the bridge->private line. And the &bridge[1] construct
> could very well be pointing to the next struct pci_host_bridge aligned address,
> which means parts of priv area are ignored.
I don't know what you mean with that. Would you rather write this as?
bridge->private = bridge + 1;
or leave it out and add a helper function
void *pci_host_bridge_private(struct pci_host_bridge *bridge)
{
return &bridge[1];
}
or do you mean we should have extra alignment in there so the
private pointer has a minimum alignment higher than the
alignment of struct pci_host_bridge?
I'm absolutely fine with any of those suggestions, whichever
makes the nicest API.
Arnd
next prev parent reply other threads:[~2016-07-01 14:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 15:19 [PATCH v2 1/2] PCI: Add new method for registering PCI hosts Thierry Reding
2016-06-30 15:19 ` [PATCH v2 2/2] PCI: tegra: Use new pci_register_host() interface Thierry Reding
2016-06-30 15:37 ` [PATCH v2 1/2] PCI: Add new method for registering PCI hosts Arnd Bergmann
2016-07-01 14:14 ` Liviu Dudau
2016-07-01 14:24 ` Arnd Bergmann [this message]
2016-07-01 14:52 ` Liviu Dudau
2016-07-01 15:17 ` Arnd Bergmann
2016-07-01 15:40 ` Liviu Dudau
2016-07-01 15:58 ` Arnd Bergmann
2016-07-01 14:46 ` Liviu Dudau
2016-07-01 15:44 ` Arnd Bergmann
2016-07-01 16:09 ` Liviu Dudau
2016-07-01 16:30 ` Arnd Bergmann
2016-07-04 9:56 ` Liviu Dudau
2016-07-04 13:46 ` Arnd Bergmann
2016-07-28 20:43 ` Bjorn Helgaas
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=6212651.41bebQZ9BM@wuerfel \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=thierry.reding@gmail.com \
--cc=tn@semihalf.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