Re: [PATCH v10 1/9] drm/panic: Add drm panic locking

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

 



On 2024-03-15, Jocelyn Falempe <jfalempe@xxxxxxxxxx> wrote:
> +static inline int drm_panic_trylock(struct drm_device *dev, unsigned long *flags)
> +{
> +	return raw_spin_trylock_irqsave(&dev->mode_config.panic_lock, *flags);
> +}

[...]

> +static inline unsigned long drm_panic_lock(struct drm_device *dev)
> +{
> +	unsigned long flags;
> +
> +	raw_spin_lock_irqsave(&dev->mode_config.panic_lock, flags);
> +	return flags;
> +}

I find it a bit strange that @flags is passed as an argument in the
trylock variant but returned in the lock variant. I would pass it as an
argument in both variants. Just a suggestion.

John Ogness



[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