netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitriy Pichugin <smokeman85@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: johannes@sipsolutions.net, davem@davemloft.net,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues
Date: Sat, 28 Jan 2017 14:49:00 +0300	[thread overview]
Message-ID: <20170128114859.GA2482@gmail.com> (raw)
In-Reply-To: <1485546515.12563.138.camel@perches.com>

On Fri, Jan 27, 2017 at 11:48:35AM -0800, Joe Perches wrote:
> On Fri, 2017-01-27 at 22:26 +0300, Pichugin Dmitry wrote:
> > This fixes the checkpatch.pl warnings:
> > * Macros should not use a trailing semicolon.
> > * Spaces required around that '='.
> > * Symbolic permissions 'S_IRUGO' are not preferred.
> 
> OK
> 
> > * Macro argument reuse 'buflen' - possible side-effects
> 
> Not all checkpatch messages need fixing.
> This is one of them.
> 
> > diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
> []
> > @@ -17,11 +17,12 @@
> >  static ssize_t name## _read(struct file *file, char __user *userbuf,	\
> >  			    size_t count, loff_t *ppos)			\
> >  {									\
> > -	struct wiphy *wiphy= file->private_data;		\
> > -	char buf[buflen];						\
> > +	struct wiphy *wiphy = file->private_data;			\
> > +	int __buflen = __builtin_constant_p(buflen) ? buflen : -1;	\
> > +	char buf[__buflen];						\
> 
> That's rather an odd change too
> 
OK. I will update the patch.

Best Regards,
Dmitriy.

  reply	other threads:[~2017-01-28 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 19:26 [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Pichugin Dmitry
2017-01-27 19:48 ` Joe Perches
2017-01-28 11:49   ` Dmitriy Pichugin [this message]
2017-01-27 21:00 ` Johannes Berg
2017-01-27 21:10   ` Joe Perches

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=20170128114859.GA2482@gmail.com \
    --to=smokeman85@gmail.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).