Thread (6 messages) 6 messages, 3 authors, 2017-08-29

Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn

From: Bryant G. Ly <hidden>
Date: 2017-08-29 13:19:57

On 8/29/17 1:20 AM, Sam Bobroff wrote:
On Mon, Aug 28, 2017 at 11:05:03AM -0500, Bryant G. Ly wrote:
quoted
For a PCI device it's pci_dn can be retrieved from
pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list.
Thus, we should just use the generic function pci_get_pdn_by_devfn
to get the pci_dn.

Signed-off-by: Bryant G. Ly <redacted>
Reviewed-by: Sam Bobroff <redacted>

I don't know this area but I tested it using a patched kernel with the
old and new code together. My test kernel booted fine (in QEMU+KVM) and
I saw 26 reads and 4 writes, all of which got the same value with either
code block.

I also checked that the error result in the "not found" case is the same
as well, which it is, because rtas_{read,write}_config() will return
PCIBIOS_DEVICE_NOT_FOUND if given a NULL pdn.

So, looks good to me.

Cheers,
Sam.
Thanks for the review Sam!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help