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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 8 Apr 2021 13:20:19 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Huang Guobin <huangguobin4@...wei.com>
Cc:     Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] gma500: Use DEFINE_SPINLOCK() for spinlock

On Tue, Apr 06, 2021 at 07:55:14PM +0800, Huang Guobin wrote:
> From: Guobin Huang <huangguobin4@...wei.com>
> 
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Guobin Huang <huangguobin4@...wei.com>

Applied to drm-misc-next, thanks for your patch.
-Daniel

> ---
>  drivers/gpu/drm/gma500/power.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
> index 56ef88237ef6..f07641dfa5a4 100644
> --- a/drivers/gpu/drm/gma500/power.c
> +++ b/drivers/gpu/drm/gma500/power.c
> @@ -36,7 +36,7 @@
>  #include <linux/pm_runtime.h>
>  
>  static struct mutex power_mutex;	/* Serialize power ops */
> -static spinlock_t power_ctrl_lock;	/* Serialize power claim */
> +static DEFINE_SPINLOCK(power_ctrl_lock);	/* Serialize power claim */
>  
>  /**
>   *	gma_power_init		-	initialise power manager
> @@ -55,7 +55,6 @@ void gma_power_init(struct drm_device *dev)
>  	dev_priv->display_power = true;	/* We start active */
>  	dev_priv->display_count = 0;	/* Currently no users */
>  	dev_priv->suspended = false;	/* And not suspended */
> -	spin_lock_init(&power_ctrl_lock);
>  	mutex_init(&power_mutex);
>  
>  	if (dev_priv->ops->init_pm)
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists