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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <297b85fc-181b-47b1-8e5f-5906e9b202ca@suse.de>
Date: Wed, 3 Jul 2024 10:16:46 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Thorsten Blum <thorsten.blum@...lux.com>,
 maarten.lankhorst@...ux.intel.com, mripard@...nel.org, airlied@...il.com,
 daniel@...ll.ch
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] drm/managed: Simplify if condition

Merged into drm-misc-next

Am 01.07.24 um 21:56 schrieb Thorsten Blum:
> The if condition !A || A && B can be simplified to !A || B.
>
> Fixes the following Coccinelle/coccicheck warning reported by
> excluded_middle.cocci:
>
> 	WARNING !A || A && B is equivalent to !A || B
>
> Compile-tested only.
>
> Acked-by: Thomas Zimmermann <tzimmermann@...e.de>
> Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
> ---
>   drivers/gpu/drm/drm_managed.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c
> index 7646f67bda4e..79ce86a5bd67 100644
> --- a/drivers/gpu/drm/drm_managed.c
> +++ b/drivers/gpu/drm/drm_managed.c
> @@ -197,7 +197,7 @@ void drmm_release_action(struct drm_device *dev,
>   	spin_lock_irqsave(&dev->managed.lock, flags);
>   	list_for_each_entry_reverse(dr, &dev->managed.resources, node.entry) {
>   		if (dr->node.release == action) {
> -			if (!data || (data && *(void **)dr->data == data)) {
> +			if (!data || *(void **)dr->data == data) {
>   				dr_match = dr;
>   				del_dr(dev, dr_match);
>   				break;

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ