diff mbox series

drm/i915/vma: constify unbind_fence_ops

Message ID 20230818112758.3586545-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/vma: constify unbind_fence_ops | expand

Commit Message

Jani Nikula Aug. 18, 2023, 11:27 a.m. UTC
unbind_fence_ops can be const and placed in rodata.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hogander, Jouni Aug. 23, 2023, 12:27 p.m. UTC | #1
On Fri, 2023-08-18 at 14:27 +0300, Jani Nikula wrote:
> unbind_fence_ops can be const and placed in rodata.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma_resource.c
> b/drivers/gpu/drm/i915/i915_vma_resource.c
> index 6ba7a7feceba..53d619ef0c3d 100644
> --- a/drivers/gpu/drm/i915/i915_vma_resource.c
> +++ b/drivers/gpu/drm/i915/i915_vma_resource.c
> @@ -94,7 +94,7 @@ static void unbind_fence_release(struct dma_fence
> *fence)
>         call_rcu(&fence->rcu, unbind_fence_free_rcu);
>  }
>  
> -static struct dma_fence_ops unbind_fence_ops = {
> +static const struct dma_fence_ops unbind_fence_ops = {
>         .get_driver_name = get_driver_name,
>         .get_timeline_name = get_timeline_name,
>         .release = unbind_fence_release,
Jani Nikula Aug. 25, 2023, 6:03 a.m. UTC | #2
On Wed, 23 Aug 2023, "Hogander, Jouni" <jouni.hogander@intel.com> wrote:
> On Fri, 2023-08-18 at 14:27 +0300, Jani Nikula wrote:
>> unbind_fence_ops can be const and placed in rodata.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

Thanks, pushed to din.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/i915_vma_resource.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_vma_resource.c
>> b/drivers/gpu/drm/i915/i915_vma_resource.c
>> index 6ba7a7feceba..53d619ef0c3d 100644
>> --- a/drivers/gpu/drm/i915/i915_vma_resource.c
>> +++ b/drivers/gpu/drm/i915/i915_vma_resource.c
>> @@ -94,7 +94,7 @@ static void unbind_fence_release(struct dma_fence
>> *fence)
>>         call_rcu(&fence->rcu, unbind_fence_free_rcu);
>>  }
>>
>> -static struct dma_fence_ops unbind_fence_ops = {
>> +static const struct dma_fence_ops unbind_fence_ops = {
>>         .get_driver_name = get_driver_name,
>>         .get_timeline_name = get_timeline_name,
>>         .release = unbind_fence_release,
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_vma_resource.c b/drivers/gpu/drm/i915/i915_vma_resource.c
index 6ba7a7feceba..53d619ef0c3d 100644
--- a/drivers/gpu/drm/i915/i915_vma_resource.c
+++ b/drivers/gpu/drm/i915/i915_vma_resource.c
@@ -94,7 +94,7 @@  static void unbind_fence_release(struct dma_fence *fence)
 	call_rcu(&fence->rcu, unbind_fence_free_rcu);
 }
 
-static struct dma_fence_ops unbind_fence_ops = {
+static const struct dma_fence_ops unbind_fence_ops = {
 	.get_driver_name = get_driver_name,
 	.get_timeline_name = get_timeline_name,
 	.release = unbind_fence_release,