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] [day] [month] [year] [list]
Message-ID: <20190904041346.GB3081@tuxbook-pro>
Date:   Tue, 3 Sep 2019 21:13:46 -0700
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Denis Efremov <efremov@...ux.com>
Cc:     linux-kernel@...r.kernel.org, Rob Clark <robdclark@...il.com>,
        Sean Paul <sean@...rly.run>, Joe Perches <joe@...ches.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v3 02/11] drm/msm: remove unlikely() from WARN_ON()
 conditions

On Thu 29 Aug 09:50 PDT 2019, Denis Efremov wrote:

> "unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely()
> internally.
> 
> Signed-off-by: Denis Efremov <efremov@...ux.com>
> Cc: Rob Clark <robdclark@...il.com>
> Cc: Sean Paul <sean@...rly.run>
> Cc: Joe Perches <joe@...ches.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-arm-msm@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org

Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>

> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 4 ++--
>  drivers/gpu/drm/msm/disp/mdp_format.c    | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> index 4804cf40de14..030279d7b64b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> @@ -253,7 +253,7 @@ int mdp5_ctl_set_cursor(struct mdp5_ctl *ctl, struct mdp5_pipeline *pipeline,
>  	u32 blend_cfg;
>  	struct mdp5_hw_mixer *mixer = pipeline->mixer;
>  
> -	if (unlikely(WARN_ON(!mixer))) {
> +	if (WARN_ON(!mixer)) {
>  		DRM_DEV_ERROR(ctl_mgr->dev->dev, "CTL %d cannot find LM",
>  			ctl->id);
>  		return -EINVAL;
> @@ -695,7 +695,7 @@ struct mdp5_ctl_manager *mdp5_ctlm_init(struct drm_device *dev,
>  		goto fail;
>  	}
>  
> -	if (unlikely(WARN_ON(ctl_cfg->count > MAX_CTL))) {
> +	if (WARN_ON(ctl_cfg->count > MAX_CTL)) {
>  		DRM_DEV_ERROR(dev->dev, "Increase static pool size to at least %d\n",
>  				ctl_cfg->count);
>  		ret = -ENOSPC;
> diff --git a/drivers/gpu/drm/msm/disp/mdp_format.c b/drivers/gpu/drm/msm/disp/mdp_format.c
> index 8afb0f9c04bb..5495d8b3f5b9 100644
> --- a/drivers/gpu/drm/msm/disp/mdp_format.c
> +++ b/drivers/gpu/drm/msm/disp/mdp_format.c
> @@ -174,7 +174,7 @@ const struct msm_format *mdp_get_format(struct msm_kms *kms, uint32_t format,
>  
>  struct csc_cfg *mdp_get_default_csc_cfg(enum csc_type type)
>  {
> -	if (unlikely(WARN_ON(type >= CSC_MAX)))
> +	if (WARN_ON(type >= CSC_MAX))
>  		return NULL;
>  
>  	return &csc_convert[type];
> -- 
> 2.21.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ