From: Alexander Aring <alex.aring@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>
Cc: linux-wpan - ML <linux-wpan@vger.kernel.org>
Subject: Re: Debug message API names for WPAN
Date: Fri, 17 Oct 2014 07:33:15 +0200 [thread overview]
Message-ID: <20141017053312.GD20252@omega> (raw)
In-Reply-To: <543FAF07.6090205@gmail.com>
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
prev parent reply other threads:[~2014-10-17 5:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 11:41 Debug message API names for WPAN Varka Bhadram
2014-10-17 5:33 ` Alexander Aring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141017053312.GD20252@omega \
--to=alex.aring@gmail.com \
--cc=linux-wpan@vger.kernel.org \
--cc=varkabhadram@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).