lkml.org 
[lkml]   [2021]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas()
From
Date
On 23/03/2021 13:05, Robin Murphy wrote:
> On 2021-03-01 12:12, John Garry wrote:
>> Function free_cpu_cached_iovas() is not only called when a CPU is
>> hotplugged, so remove that part of the code comment.
>
> FWIW I read it as clarifying why this is broken out into a separate
> function vs. a monolithic "free all cached IOVAs" routine that handles
> both the per-cpu and global caches

> it never said "*only* used..."

It seems to be implying that.

It's only a code comment, so I don't care too much either way and can
drop this change.

>
> As such I'd hesitate to call it incorrect, but it's certainly arguable
> whether it needs to be stated or not, especially once the hotplug
> callsite is now obvious in the same file - on which note the function
> itself also shouldn't need to be public any more, no?
>

Right, I actually missed deleting iommu_dma_free_cpu_cached_iovas(), so
can fix that now.

Cheers,
John

> Robin.
>
>> Signed-off-by: John Garry <john.garry@huawei.com>
>> ---
>>   drivers/iommu/iova.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
>> index c78312560425..465b3b0eeeb0 100644
>> --- a/drivers/iommu/iova.c
>> +++ b/drivers/iommu/iova.c
>> @@ -996,7 +996,7 @@ static void free_iova_rcaches(struct iova_domain
>> *iovad)
>>   }
>>   /*
>> - * free all the IOVA ranges cached by a cpu (used when cpu is unplugged)
>> + * free all the IOVA ranges cached by a cpu
>>    */
>>   void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad)
>>   {
>>
> .

\
 
 \ /
  Last update: 2021-03-23 15:00    [W:0.049 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site