[lkml]   [2018]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/3] PCI: Allow specifying devices using a base bus and path of devfns

On 30/05/18 10:23 AM, Alex Williamson wrote:
> I like the idea, but can't we improve the implementation? It seems
> that we shouldn't need to allocate more than a working copy of the
> original path string. We can use strrchr() to find the last path
> divider ('/'), match the slot.fn after that to the current devfn, set
> that path divider to null, step to the next upstream device and
> repeat.

Ok, I'll give it a shot. I thought this would be a bit more tricky, but
perhaps not.

> Also, since we're working from a downstream device up, I
> suspect we don't need to get and put references at each step, the
> downstream device probably already holds a reference to the upstream
> device for each step along the way.

That makes sense to me. I think it's something I added in similar p2pdma
code from somebody's review. But sounds like I can probably strip it out
there too and just put a comment noting this.



 \ /
  Last update: 2018-05-30 19:38    [W:0.031 / U:20.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site