[PATCH staging 6/6] et131x: uncloak PCIe capabilities.

Mark Einon mark.einon at gmail.com
Mon Oct 24 19:56:06 UTC 2011


On Sun, Oct 23, 2011 at 07:12:14PM +0200, Francois Romieu wrote:
> FIXME: it should be possible to get rid of ET1310_PCI_L0L1LATENCY as well.
> 
> Signed-off-by: Francois Romieu <romieu at fr.zoreil.com>
> ---
>  drivers/staging/et131x/et131x.c |   53 ++++++++++++++++++++++----------------
>  1 files changed, 31 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
> index 79ca1d3..2a0b794 100644
> --- a/drivers/staging/et131x/et131x.c
> +++ b/drivers/staging/et131x/et131x.c
[...]
> -	if (et131x_init_eeprom(adapter) < 0)
> -		return -EIO;
> +	rc = et131x_init_eeprom(adapter);
> +	if (rc < 0)
> +		goto out;
>  
[...]
>  	}
>  	memcpy(adapter->addr, adapter->rom_addr, ETH_ALEN);
> -	return 0;
> +out:
> +	return rc;
> +err_out:
> +	rc = -EIO;
> +	goto out;
>  }

Hi Francois,

The PCIe changes are good, however I think using gotos here doesn't add anything as there's no difficult locking to navigate and makes the code harder to read.
both out: and err_out: are used to return an error, and the backwards jumping goto makes me a bit uncomfortable. Could you respin with just the PCIe changes?

Cheers,

Mark



More information about the devel mailing list