[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170128114859.GA2482@gmail.com>
Date: Sat, 28 Jan 2017 14:49:00 +0300
From: Dmitriy Pichugin <smokeman85@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: johannes@...solutions.net, davem@...emloft.net,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues
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.
Powered by blists - more mailing lists