Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Williams, Mitch A" <mitch.a.williams@intel.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"gospo@redhat.com" <gospo@redhat.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Subject: Re: [net-next v2 11/16] i40e: remove chatty log messages
Date: Fri, 20 Dec 2013 10:31:32 -0800	[thread overview]
Message-ID: <1387564292.2353.58.camel@joe-AO722> (raw)
In-Reply-To: <AAEA33E297BCAC4B9BB20A7C2DF0AB8D654E35E2@FMSMSX113.amr.corp.intel.com>

On Fri, 2013-12-20 at 18:04 +0000, Williams, Mitch A wrote:
> > From: Joe Perches [mailto:joe@perches.com]
[]
> > this code is inconsistent and might be
> > nicer using the same form:
> > 
> > 		/* Skip if the queue is already in the requested state */
> > 		if (enable && (tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > 			continue;
> > 		if (!enable && !(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > 			continue;
> > 
> > [...]
> > 
> > 		/* wait for the change to finish */
> > 		for (j = 0; j < 10; j++) {
> > 			tx_reg = rd32(hw, I40E_QTX_ENA(pf_q));
> > 			if (enable) {
> > 				if ((tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > 					break;
> > 			} else {
> > 				if (!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > 					break;
> > 			}
> > 
> > Perhaps the first form should be like the second
> > 
> > 	if (enable) {
> > 		if (tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)
> > 			continue;
> > 	} else {
> > 		if (!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > 			continue;
> > 	}
> > 
> > or maybe both should be
> > 
> > 	bool mask = tx_reg & I40E_QTX_ENA_QENA_STAT_MASK;
> > 	if (enable ^ mask)
[]
> I see what you mean about the inconsistent logic. Since it's not
> crucial, I think I'd prefer to fix this in a separate patch in the
> future. (I'll implement it today, but it takes a while to get through
> our internal validation process.)

Whenever, no worries, it's just a nit.

  reply	other threads:[~2013-12-20 18:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 16:45 [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 01/16] i40e: using for_each_set_bit to simplify the code Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 02/16] i40e: Suppress HMC error to Interrupt message level Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 03/16] i40e: Populate and check pci bus speed and width Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 04/16] i40e: add wake-on-lan support Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 05/16] i40e: fix curly brace use and return type Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 06/16] i40e: Implementation of vxlan ndo's Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 07/16] i40e: Rx checksum offload for VXLAN Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 08/16] i40e: move i40e_reset_vf Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 09/16] i40e: refactor VF reset flow Jeff Kirsher
2013-12-20 16:45 ` [net-next v2 10/16] i40e: remove redundant code Jeff Kirsher
2013-12-20 16:46 ` [net-next v2 11/16] i40e: remove chatty log messages Jeff Kirsher
2013-12-20 18:18   ` Sergei Shtylyov
2013-12-20 17:40     ` Williams, Mitch A
2013-12-20 17:59       ` Joe Perches
2013-12-20 18:00         ` Jeff Kirsher
2013-12-20 18:04         ` Williams, Mitch A
2013-12-20 18:31           ` Joe Perches [this message]
2013-12-20 18:00       ` Williams, Mitch A
2013-12-20 16:46 ` [net-next v2 12/16] i40e: fix error return Jeff Kirsher
2013-12-20 16:46 ` [net-next v2 13/16] i40e: be more informative Jeff Kirsher
2013-12-20 16:46 ` [net-next v2 14/16] i40e: make a define from a large constant Jeff Kirsher
2013-12-20 16:46 ` [net-next v2 15/16] i40e: update led set args Jeff Kirsher
2013-12-20 16:46 ` [net-next v2 16/16] i40e: report VF MAC addresses correctly Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387564292.2353.58.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox