On Wed, 2019-08-28 at 16:14 +0200, Christoph Hellwig wrote: > Various helpers need the pci_sysdata just to dereference a single field > in it. Add a little helper that returns the properly typed sysdata > pointer to require a little less boilerplate code. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > arch/x86/include/asm/pci.h | 28 +++++++++++++--------------- > 1 file changed, 13 insertions(+), 15 deletions(-) > > diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h > index 6fa846920f5f..75fe28492290 100644 > --- a/arch/x86/include/asm/pci.h > +++ b/arch/x86/include/asm/pci.h > @@ -35,12 +35,15 @@ extern int noioapicreroute; > > #ifdef CONFIG_PCI > > +static inline struct pci_sysdata *to_pci_sysdata(struct pci_bus *bus) Can you make the argument const to avoid all the warnings from callers passing const struct pci_bus snip