All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>,
	Jason Baron <jbaron@redhat.com>,
	"John W . Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org,
	"Luis R . Rodriguez" <rodrigue@qca.qualcomm.com>
Subject: Re: [PATCH v7 1/2] wireless: Driver for 60GHz card wil6210
Date: Tue, 13 Nov 2012 14:52:48 -0800	[thread overview]
Message-ID: <20121113145248.f617e67f.akpm@linux-foundation.org> (raw)
In-Reply-To: <1352846384.17444.18.camel@joe-AO722>

On Tue, 13 Nov 2012 14:39:44 -0800
Joe Perches <joe@perches.com> wrote:

> On Tue, 2012-11-13 at 13:44 -0800, Andrew Morton wrote:
> > On Tue, 13 Nov 2012 05:06:10 -0800
> > Joe Perches <joe@perches.com> wrote:
> > 
> > > On Tue, 2012-11-13 at 14:23 +0200, Vladimir Kondratiev wrote:
> > > []
> > > > diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
> > > []
> > > > +/* Candidate to merge into printk.h and dynamic_debug.h */
> > > > +#if defined(CONFIG_DYNAMIC_DEBUG)
> > > > +#define dynamic_hex_dump(prefix_str, prefix_type, rowsize,	\
> > > > +			 groupsize, buf, len, ascii)		\
> > > > +do {								\
> > > > +	DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, prefix_str);	\
> > > > +	if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT))	\
> > > > +		print_hex_dump(KERN_DEBUG, prefix_str,		\
> > > > +			       prefix_type, rowsize, groupsize,	\
> > > > +			       buf, len, ascii);		\
> > > > +} while (0)
> > > > +
> > > > +#define debug_hex_dump(prefix_str, prefix_type, rowsize,	\
> > > > +		       groupsize, buf, len, ascii)		\
> > > > +		       dynamic_hex_dump(prefix_str, prefix_type,\
> > > > +					rowsize, groupsize, buf,\
> > > > +					len, ascii)
> > > > +#else
> > > > +#define debug_hex_dump(prefix_str, prefix_type, rowsize,	\
> > > > +		       groupsize, buf, len, ascii)		\
> > > > +		       print_hex_dump(KERN_DEBUG, prefix_str,	\
> > > > +				      prefix_type, rowsize,	\
> > > > +				      groupsize, buf, len, ascii)
> > > > +#endif
> > > 
> > > Thanks Vladimir.  I think so too.
> > > 
> > > Jason?  Andrew?
> > 
> > (I'm not on linux-wireless)
> > 
> > Agree that the above should be in a core header file.
> > 
> > Disagree with placing it in a wireless header.
> > 
> > Please split it out into a standalone patch.
> > 
> > Does it have to be done as macros?  Can't do at least some of
> > this in C?
> 
> Macros are required here because of CONFIG_DYNAMIC_DEBUG

I don't see why?

> It's how it's done currently for all dynamic_<foo> uses.
> 
> > Some interface documentation would be nice, especially if it's
> > implemented in macros - that's an awful lot of arguments to have to
> > guess about.
> 
> kernel-doc should probably be added for all printk forms,
> not just for this.

These ones are pretty egregious but on reflection, they're just
wrappers around print_hex_dump(), which is documented - there's no
point in saying the same thing in two places.  

  reply	other threads:[~2012-11-13 22:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 12:23 [PATCH v7 0/2] driver for 60g Wilocity chip wil6210 Vladimir Kondratiev
2012-11-13 12:23 ` [PATCH v7 1/2] wireless: Driver for 60GHz card wil6210 Vladimir Kondratiev
2012-11-13 13:06   ` Joe Perches
2012-11-13 21:44     ` Andrew Morton
2012-11-13 22:39       ` Joe Perches
2012-11-13 22:52         ` Andrew Morton [this message]
2012-11-14 12:21       ` Vladimir Kondratiev
2012-11-13 19:54   ` Johannes Berg
     [not found]     ` <16914852.FhZEtcXc7Y@lx-vladimir>
2012-11-16 13:40       ` Johannes Berg
2012-11-18 16:35         ` Vladimir Kondratiev
2012-11-13 12:23 ` [PATCH v7 2/2] wireless: integrate wil6210 driver into build structure Vladimir Kondratiev
2012-11-13 19:54   ` Johannes Berg
2012-11-13 23:23     ` Julian Calaby
     [not found]       ` <4652801.Xt8tN7pgs4@lx-vladimir>
2012-11-14  9:32         ` Johannes Berg
2012-11-14 13:48           ` Vladimir Kondratiev
     [not found]     ` <4396194.ZVOZT6GsHI@lx-vladimir>
2012-11-14  9:30       ` Johannes Berg

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=20121113145248.f617e67f.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jbaron@redhat.com \
    --cc=joe@perches.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=qca_vkondrat@qca.qualcomm.com \
    --cc=rodrigue@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.