lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH staging 6/6] et131x: uncloak PCIe capabilities.
    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@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


    \
     
     \ /
      Last update: 2011-10-24 21:59    [W:3.118 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site