[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1402248859.6328.13.camel@joe-AO725>
Date: Sun, 08 Jun 2014 10:34:19 -0700
From: Joe Perches <joe@...ches.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: davem@...emloft.net, Mitch Williams <mitch.a.williams@...el.com>,
netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 11/15] i40e/i40evf: remove chatty reset messages
On Sun, 2014-06-08 at 07:33 -0700, Jeff Kirsher wrote:
> Because some of these message are inside if statements, we have to
> rejigger the brackets at the same time to keep our coding style
> consistent.
trivia:
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
[]
> @@ -1503,12 +1500,10 @@ static void i40evf_reset_task(struct work_struct *work)
> for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
> rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
> I40E_VFGEN_RSTAT_VFR_STATE_MASK;
> - if (rstat_val == I40E_VFR_VFACTIVE) {
> - dev_info(&adapter->pdev->dev, "Reset complete, reinitializing\n");
> + if (rstat_val == I40E_VFR_VFACTIVE)
> break;
> - } else {
> + else
> msleep(I40EVF_RESET_WAIT_MS);
> - }
> }
> if (i == I40EVF_RESET_WAIT_COUNT) {
> /* reset never finished */
Unnecessary else, maybe simpler as
for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
I40E_VFGEN_RSTAT_VFR_STATE_MASK;
if (rstat_val == I40E_VFR_VFACTIVE)
break;
msleep(I40EVF_RESET_WAIT_MS);
}
--
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