Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 23, 2025 at 10:35:43AM +0100, Philipp Stanner wrote:
> On Thu, 2025-01-23 at 10:29 +0100, Danilo Krummrich wrote:
> > On Thu, Jan 23, 2025 at 08:33:01AM +0100, Philipp Stanner wrote:
> > > On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote:
> > > > On Wed, 22 Jan 2025 15:08:20 +0100
> > > > Philipp Stanner <phasta@xxxxxxxxxx> wrote:
> > > > 
> > > > >  int drm_sched_init(struct drm_gpu_scheduler *sched,
> > > > > -    const struct drm_sched_backend_ops *ops,
> > > > > -    struct workqueue_struct *submit_wq,
> > > > > -    u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > > > -    long timeout, struct workqueue_struct *timeout_wq,
> > > > > -    atomic_t *score, const char *name, struct device *dev);
> > > > > + const struct drm_sched_init_params *params);
> > > > 
> > > > 
> > > > Another nit: indenting is messed up here.
> > > 
> > > That was done on purpose.
> > 
> > Let's not change this convention, it's used all over the kernel tree,
> > including
> > the GPU scheduler. People are used to read code that is formatted
> > this way, plus
> > the attempt of changing it will make code formatting inconsistent.
> 
> Both the tree and this file are already inconsistent in regards to
> this.

That's not really a good argument to make it more inconsistent, is it?

> 
> Anyways, what is your proposed solution to ridiculous nonsense like
> this?
> 
> https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/gpu/drm/scheduler/sched_main.c#L1296

I don't think this one needs a solution.

The kernel picked a convention long ago, which also has downsides. If it gets
too bad, we can deviate from conventions at any point of time; for the thing
that otherwise would be bad, but we shouldn't do it in general.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux