[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190902172433.GA8007@kashyyyk>
Date: Mon, 2 Sep 2019 14:24:33 -0300
From: Mauro Rodrigues <maurosr@...ux.vnet.ibm.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net,
netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
Andrew Bowers <andrewx.bowers@...el.com>
Subject: Re: [net-next 11/15] i40e: Implement debug macro hw_dbg using
pr_debug
On Wed, Aug 28, 2019 at 03:39:53PM -0700, Jakub Kicinski wrote:
> On Tue, 27 Aug 2019 23:44:03 -0700, Jeff Kirsher wrote:
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
> > index a07574bff550..c0c9ce3eab23 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_osdep.h
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
> > @@ -18,7 +18,12 @@
> > * actual OS primitives
> > */
> >
> > -#define hw_dbg(hw, S, A...) do {} while (0)
> > +#define hw_dbg(hw, S, A...) \
> > +do { \
> > + int domain = pci_domain_nr(((struct i40e_pf *)(hw)->back)->pdev->bus); \
> > + pr_debug("i40e %04x:%02x:%02x.%x " S, domain, (hw)->bus.bus_id, \
> > + (hw)->bus.device, (hw)->bus.func, ## A); \
>
> This looks like open coded dev_dbg() / dev_namie(), why?
Indeed, thanks for pointing out. I'll fix this and the other patch you
reviewed and resubmit.
I'm not sure what should be the preferred approach here though, just use
dev_dbg to implement this macro or replace all of its occurrence in the
code by dev_dbg?
Jeff, do you have any preference?
>
> > +} while (0)
Powered by blists - more mailing lists