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)