lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250129085625.502ab114@collabora.com>
Date: Wed, 29 Jan 2025 08:56:25 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Christian Gmeiner <christian.gmeiner@...il.com>
Cc: Philipp Stanner <phasta@...nel.org>, Alex Deucher
 <alexander.deucher@....com>, Christian König
 <christian.koenig@....com>, Xinhui Pan <Xinhui.Pan@....com>, David Airlie
 <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Lucas Stach
 <l.stach@...gutronix.de>, Russell King <linux+etnaviv@...linux.org.uk>,
 Frank Binns <frank.binns@...tec.com>, Matt Coster <matt.coster@...tec.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
 <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, Qiang Yu
 <yuq825@...il.com>, Rob Clark <robdclark@...il.com>, Sean Paul
 <sean@...rly.run>, Konrad Dybcio <konradybcio@...nel.org>, Abhinav Kumar
 <quic_abhinavk@...cinc.com>, Dmitry Baryshkov
 <dmitry.baryshkov@...aro.org>, Marijn Suijten
 <marijn.suijten@...ainline.org>, Karol Herbst <kherbst@...hat.com>, Lyude
 Paul <lyude@...hat.com>, Danilo Krummrich <dakr@...hat.com>, Rob Herring
 <robh@...nel.org>, Steven Price <steven.price@....com>, Liviu Dudau
 <liviu.dudau@....com>, Matthew Brost <matthew.brost@...el.com>, Melissa Wen
 <mwen@...lia.com>, Maíra Canal <mcanal@...lia.com>, Lucas De
 Marchi <lucas.demarchi@...el.com>, Thomas Hellström
 <thomas.hellstrom@...ux.intel.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>,
 Sunil Khatri <sunil.khatri@....com>, Lijo Lazar <lijo.lazar@....com>,
 Hawking Zhang <Hawking.Zhang@....com>, Mario Limonciello
 <mario.limonciello@....com>, Ma Jun <Jun.Ma2@....com>, Yunxiang Li
 <Yunxiang.Li@....com>, amd-gfx@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 etnaviv@...ts.freedesktop.org, lima@...ts.freedesktop.org,
 linux-arm-msm@...r.kernel.org, freedreno@...ts.freedesktop.org,
 nouveau@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org
Subject: Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

On Tue, 28 Jan 2025 22:49:47 +0100
Christian Gmeiner <christian.gmeiner@...il.com> 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);
> >  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ