summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>2025-09-19 14:15:29 +0100
committerTvrtko Ursulin <tursulin@ursulin.net>2025-12-03 14:48:41 +0000
commit802620f5a9cf7231933cfce61817577b3b6543d9 (patch)
tree7db3a47db678c9b4dc90b1d0edd82e67c7016fdd /drivers/gpu/drm/ttm
parentfeb065155bab2fabc3545bf57ae31e86d02df9a1 (diff)
downloadlwn-802620f5a9cf7231933cfce61817577b3b6543d9.tar.gz
lwn-802620f5a9cf7231933cfce61817577b3b6543d9.zip
drm/ttm: Tidy ttm_operation_ctx initialization
No need to initialize a subset of fields to zero. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Link: https://lore.kernel.org/r/20250919131530.91247-4-tvrtko.ursulin@igalia.com Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net> [tursulin: fixup conflict in ttm_resource_manager_evict_all]
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c10
-rw-r--r--drivers/gpu/drm/ttm/ttm_device.c5
-rw-r--r--drivers/gpu/drm/ttm/ttm_resource.c5
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c2
4 files changed, 5 insertions, 17 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 2ff35d55e462..c00371894fa1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -343,10 +343,7 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
struct ttm_bo_kmap_obj *map)
{
struct ttm_resource *mem = bo->resource;
- struct ttm_operation_ctx ctx = {
- .interruptible = false,
- .no_wait_gpu = false
- };
+ struct ttm_operation_ctx ctx = { };
struct ttm_tt *ttm = bo->ttm;
struct ttm_resource_manager *man =
ttm_manager_type(bo->bdev, bo->resource->mem_type);
@@ -530,10 +527,7 @@ int ttm_bo_vmap(struct ttm_buffer_object *bo, struct iosys_map *map)
iosys_map_set_vaddr_iomem(map, vaddr_iomem);
} else {
- struct ttm_operation_ctx ctx = {
- .interruptible = false,
- .no_wait_gpu = false
- };
+ struct ttm_operation_ctx ctx = { };
struct ttm_tt *ttm = bo->ttm;
pgprot_t prot;
void *vaddr;
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 9a51afaf0749..d3bfb9a696a7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -135,10 +135,7 @@ out:
*/
int ttm_device_prepare_hibernation(struct ttm_device *bdev)
{
- struct ttm_operation_ctx ctx = {
- .interruptible = false,
- .no_wait_gpu = false,
- };
+ struct ttm_operation_ctx ctx = { };
int ret;
do {
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 2dd19f229d32..a31683f7f310 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -545,10 +545,7 @@ EXPORT_SYMBOL(ttm_resource_manager_init);
int ttm_resource_manager_evict_all(struct ttm_device *bdev,
struct ttm_resource_manager *man)
{
- struct ttm_operation_ctx ctx = {
- .interruptible = false,
- .no_wait_gpu = false,
- };
+ struct ttm_operation_ctx ctx = { };
struct dma_fence *fence;
int ret, i;
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 611d20ab966d..af33fa020249 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -456,7 +456,7 @@ EXPORT_SYMBOL_FOR_TESTS_ONLY(ttm_tt_unpopulate);
/* Test the shrinker functions and dump the result */
static int ttm_tt_debugfs_shrink_show(struct seq_file *m, void *data)
{
- struct ttm_operation_ctx ctx = { false, false };
+ struct ttm_operation_ctx ctx = { };
seq_printf(m, "%d\n", ttm_global_swapout(&ctx, GFP_KERNEL));
return 0;