Re: [PATCH 1/4] cxgb3: Use more common logging style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-02-09 at 16:34 -0600, Steve Wise wrote:
> > Subject: [PATCH 1/4] cxgb3: Use more common logging style
[]
> > -#define MOD "iw_cxgb3: "
> > -#define PDBG(fmt, args...) pr_debug(MOD fmt, ## args)
> > +#ifdef pr_fmt
> > +#undef pr_fmt
> > +#endif
> 
> Is the ifdef/undef needed?  I see other modules just define pr_fmt() regardless.

Yes.

Because kernel.h may be included before this file,
kernel.h creates a define for pr_fmt, so this must
be undef'd before redefining it.

The other option, done in most files, is to add
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux