On Fri, Jan 10, 2020 at 10:21:09AM -0700, Jon Derrick wrote: > From: Christoph Hellwig <hch@xxxxxx> > > 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> > [jonathan.derrick: added un-const cast] > + return to_pci_sysdata((struct pci_bus *) bus)->node; Instead of this case I think we'd be better off marking the bus argument to to_pci_sysdata const.