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: <YL3hvMW3d2cd8IT1@smile.fi.intel.com>
Date:   Mon, 7 Jun 2021 12:07:08 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     arnd@...db.de, gregkh@...uxfoundation.org,
        mihai.carabas@...cle.com, akpm@...ux-foundation.org,
        yuehaibing@...wei.com, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] misc/pvpanic: Remove some dead-code

On Sat, Jun 05, 2021 at 06:53:47PM +0200, Christophe JAILLET wrote:
> 'pvpanic_remove()' is referenced only by a 'devm_add_action_or_reset()'
> call in 'devm_pvpanic_probe()'. So, we know that its parameter is non-NULL.
> 
> Axe the unneeded check to save a few lines of code.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Thanks!

> Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/misc/pvpanic/pvpanic.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/misc/pvpanic/pvpanic.c b/drivers/misc/pvpanic/pvpanic.c
> index 82770a088d62..02b807c788c9 100644
> --- a/drivers/misc/pvpanic/pvpanic.c
> +++ b/drivers/misc/pvpanic/pvpanic.c
> @@ -66,9 +66,6 @@ static void pvpanic_remove(void *param)
>  	struct pvpanic_instance *pi_cur, *pi_next;
>  	struct pvpanic_instance *pi = param;
>  
> -	if (!pi)
> -		return;
> -
>  	spin_lock(&pvpanic_lock);
>  	list_for_each_entry_safe(pi_cur, pi_next, &pvpanic_list, list) {
>  		if (pi_cur == pi) {
> -- 
> 2.30.2
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ