* Debug message API names for WPAN
@ 2014-10-16 11:41 Varka Bhadram
2014-10-17 5:33 ` Alexander Aring
0 siblings, 1 reply; 2+ messages in thread
From: Varka Bhadram @ 2014-10-16 11:41 UTC (permalink / raw)
To: linux-wpan - ML
Hi,
I am planning to implement the debug message API's for WPAN.
I thought of using the name started with wpan_*. ex: wpan_info(),wpan_dbg()..
Is this API name is OK....?
In which header file i can add these '#define's.. ieee802154.h or mac802154.h..?
If these things are confirmed patches are on the way.
--
Thanks and Regards,
Varka Bhadram.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Debug message API names for WPAN
2014-10-16 11:41 Debug message API names for WPAN Varka Bhadram
@ 2014-10-17 5:33 ` Alexander Aring
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Aring @ 2014-10-17 5:33 UTC (permalink / raw)
To: Varka Bhadram; +Cc: linux-wpan - ML
Hi Varka,
On Thu, Oct 16, 2014 at 05:11:59PM +0530, Varka Bhadram wrote:
> Hi,
>
> I am planning to implement the debug message API's for WPAN.
>
ok.
> I thought of using the name started with wpan_*. ex: wpan_info(),wpan_dbg()..
>
> Is this API name is OK....?
>
For what is the API for?
Such function are good for debugging device specific things. People knows
then about to which interface or phy the printout (dbg/error/warning, etc..)
belongs to. Instead to doing pr_debug("%s: ... ", wpan_phy_name(phy), ...);
Simple we should call then wpan_phy_info(phy, "...");
Now for interface we should use netdev_dbg, etc... functions, because
these interfaces belongs a netdev device and netdev_foo macros are
already exist.
For phy debugging macros we should introduce such function, because we
create the wpan_phy struct in "include/net/wpan-phy.h". It's a own
new device class.
These names for these functions should be wpan_phy_info(wpan_phy). The
wpan_phy struct contains a "struct device dev" then you should call the
generic device prinout functions like dev_info, etc...
> In which header file i can add these '#define's.. ieee802154.h or mac802154.h..?
>
The ieee802154 header should contain ONLY things which comes from IEEE
802.15.4 standard. Put it in "include/net/wpan-phy.h".
But introduce such function only for phy handling not interface
handling, use then netdev_foo.
What I don't will ack are such things like:
#define wpan_info(...) pr_info(...)
this makes really no sense.
> If these things are confirmed patches are on the way.
>
ok.
- Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-17 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 11:41 Debug message API names for WPAN Varka Bhadram
2014-10-17 5:33 ` Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).