[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20151009130153.GA4284@hmsreliant.think-freely.org>
Date: Fri, 9 Oct 2015 09:01:54 -0400
From: Neil Horman <nhorman@...driver.com>
To: hariprasad@...lsio.com
Cc: netdev@...r.kernel.org, davem@...emloft.net, leedom@...lsio.com,
nirranjan@...lsio.com
Subject: Re: [PATCHv2 net-next] cxgb4: Enhance driver to update FW, when FW
is too old
> ret = t4_get_fw_version(adap, &adap->params.fw_vers);
>+ /* Try multiple times before returning error */
>+ for (i = 0; (ret == -EBUSY || ret == -EAGAIN) && i < 3; i++)
>+ ret = t4_get_fw_version(adap, &adap->params.fw_vers);
>+
> if (ret)
> return ret;
Nit: Just initalize ret to -EBUSY and change the test for i to < 4 rather than <
3. That way you will only have one call site for t4_get_fw_version, which I
think is more readable. Alternatively a do..while loop might be appropriate
here.
But I suppose I'm just splitting hairs at this point
Acked-by: Neil Horman <nhorman@...driver.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists