lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1387562457.2183.90.camel@jtkirshe-mobl>
Date:	Fri, 20 Dec 2013 10:00:57 -0800
From:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To:	Joe Perches <joe@...ches.com>
Cc:	"Williams, Mitch A" <mitch.a.williams@...el.com>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>
Subject: Re: [net-next v2 11/16] i40e: remove chatty log messages

On Fri, 2013-12-20 at 09:59 -0800, Joe Perches wrote:
> On Fri, 2013-12-20 at 17:40 +0000, Williams, Mitch A wrote:
> > > -----Original Message-----
> > > From: Sergei Shtylyov [mailto:sergei.shtylyov@...entembedded.com]
> []
> > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> []
> > > > @@ -2988,21 +2988,11 @@ static int i40e_vsi_control_tx(struct
> i40e_vsi
> > > *vsi, bool enable)
> > > >                   } while (j-- && ((tx_reg >>
> I40E_QTX_ENA_QENA_REQ_SHIFT)
> > > >                                  ^ (tx_reg >>
> I40E_QTX_ENA_QENA_STAT_SHIFT)) & 1);
> > > >
> > > > -         if (enable) {
> > > > -                 /* is STAT set ? */
> > > > -                 if ((tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)) {
> > > > -                         dev_info(&pf->pdev->dev,
> > > > -                                  "Tx %d already enabled\n",
> i);
> > > > +         /* Skip if the queue is already in the requested state
> */
> > > > +         if (enable && (tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
> > > >                                   continue;
> > > 
> > >     This line seems over-indented now.
> > > 
> > > > -                 }
> > > > -         } else {
> > > > -                 /* is !STAT set ? */
> > > > -                 if (!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)) {
> > > > -                         dev_info(&pf->pdev->dev,
> > > > -                                  "Tx %d already disabled\n",
> i);
> > > > +         if (!enable && !(tx_reg &
> I40E_QTX_ENA_QENA_STAT_MASK))
> > > >                                   continue;
> > > 
> > >     This one too.
> []
> > Sergei, if you look at the source instead of the patch, you'll see
> > that these are correct. The whole thing is inside a for loop, so it
> > should properly be indented two tabs.
> 
> I looked at the source.
> Both continue statements _are_ overly indented.
> 4 tabs should be 3.
> 
> Also, 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;

Sergei was right.  I will get this fixed up and re-submit v3.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ