On Mon, Feb 16, 2026, at 13:32, Thomas Hellström wrote:
> On Mon, 2026-02-16 at 13:16 +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <[email protected]>
>>
>> Passing a structure by reference into a function is sometimes
>> problematic,
>
> Do you mean passing by *value* is problematic?
Yes
>> static void xe_pagemap_destroy_work(struct work_struct *work)
>> diff --git a/include/drm/drm_pagemap.h b/include/drm/drm_pagemap.h
>> index 2baf0861f78f..74a32d0dacd8 100644
>> --- a/include/drm/drm_pagemap.h
>> +++ b/include/drm/drm_pagemap.h
>> @@ -95,7 +95,7 @@ struct drm_pagemap_ops {
>> */
>> void (*device_unmap)(struct drm_pagemap *dpagemap,
>> struct device *dev,
>> - struct drm_pagemap_addr addr);
>> + struct drm_pagemap_addr *addr);
>
> Makes sense, although this should preferrably be
>
> const struct drm_pagemap_addr *addr;
>
Good point, I'll send a v2 with both changes after some more testing.
Arnd