aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorOliver O'Halloran <[email protected]>2020-07-22 16:57:00 +1000
committerMichael Ellerman <[email protected]>2020-07-26 23:34:21 +1000
commit5609ffddd19dd52019d78b197e86b0331aeef8ae (patch)
tree49e13b428f96dabcaf50159849bc90a7b3004274 /tools/perf/scripts/python
parenta131bfc69bc868083a6c7f9b5dad1331902a3534 (diff)
powerpc/powernv/pci: Add pci_bus_to_pnvhb() helper
Add a helper to go from a pci_bus structure to the pnv_phb that hosts that bus. There's a lot of instances of the following pattern: struct pci_controller *hose = pci_bus_to_host(pdev->bus); struct pnv_phb *phb = hose->private_data; Without any other uses of the pci_controller inside the function. This is hard to read since it requires you to memorise the contents of the private data fields and kind of error prone since it involves blindly assigning a void pointer. Add a helper to make it more concise and explicit. Signed-off-by: Oliver O'Halloran <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions