On Tue, 28 Jan 2025 22:49:47 +0100 Christian Gmeiner <christian.gmeiner@xxxxxxxxx> wrote: > > int etnaviv_sched_init(struct etnaviv_gpu *gpu) > > { > > - int ret; > > + const struct drm_sched_init_args args = { > > Why not declare it as static const struct drm_sched_init_args args = { ? Because some bits in there are not static, in this particular case, gpu->dev is not static for instance. > This question applies to all similar occurrences in the patch. > > > + .ops = &etnaviv_sched_ops, > > + .num_rqs = DRM_SCHED_PRIORITY_COUNT, > > + .credit_limit = etnaviv_hw_jobs_limit, > > + .hang_limit = etnaviv_job_hang_limit, > > + .timeout = msecs_to_jiffies(500), > > + .name = dev_name(gpu->dev), > > + .dev = gpu->dev > > + }; > > > > - ret = drm_sched_init(&gpu->sched, &etnaviv_sched_ops, NULL, > > - DRM_SCHED_PRIORITY_COUNT, > > - etnaviv_hw_jobs_limit, etnaviv_job_hang_limit, > > - msecs_to_jiffies(500), NULL, NULL, > > - dev_name(gpu->dev), gpu->dev); > > - if (ret) > > - return ret; > > - > > - return 0; > > + return drm_sched_init(&gpu->sched, &args); > > }