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]
Date:	Mon, 10 Nov 2014 21:13:46 -0700
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Quentin Lambert <lambert.quentin@...il.com>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	julia.lawall@...6.fr, fengguang.wu@...el.com,
	Srikanth Thokala <sriku.linux@...il.com>
Subject: Re: [PATCH v2] PCI: remove an unnecessary if condition before a
 return statement

[+cc Srikanth]

On Fri, Nov 07, 2014 at 09:06:39AM +0100, Quentin Lambert wrote:
> Simplify a trivial if-return sequence.  Possibly combine with a
> preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> Signed-off-by: Quentin Lambert <lambert.quentin@...il.com>

Applied to pci/misc for v3.19, thanks!

I have no idea what it means, but I did add back the comment as Srikanth
pointed out.

> ---
> 
> Changes in v2:
>  - remove a checkpatch warning due to the a space between after the
>    function name.
> 
>  drivers/pci/hotplug/ibmphp_res.c | 5 +----
>  drivers/pci/pci.c                | 6 +-----
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
> index 219ba80..2da59ef 100644
> --- a/drivers/pci/hotplug/ibmphp_res.c
> +++ b/drivers/pci/hotplug/ibmphp_res.c
> @@ -376,10 +376,7 @@ int __init ibmphp_rsrc_init (void)
>  		if (rc)
>  			return rc;
>  	}
> -	rc = once_over ();  /* This is to align ranges (so no -1) */
> -	if (rc)
> -		return rc;
> -	return 0;
> +	return once_over();
>  }
>  
>  /********************************************************************************
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 625a4ac..9a5871f 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1012,11 +1012,7 @@ int pci_save_state(struct pci_dev *dev)
>  	if (i != 0)
>  		return i;
>  
> -	i = pci_save_vc_state(dev);
> -	if (i != 0)
> -		return i;
> -
> -	return 0;
> +	return pci_save_vc_state(dev);
>  }
>  EXPORT_SYMBOL(pci_save_state);
>  
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ