Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568872
| From | Dmitriy Pichugin <smokeman85@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues |
| Date | 2017-01-28 13:00 +0100 |
| Message-ID | <t4zPI-X4-41@gated-at.bofh.it> (permalink) |
| References | <t4kxj-8fo-5@gated-at.bofh.it> <t4kH0-8j4-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Pichugin Dmitry <smokeman85@gmail.com> - 2017-01-27 20:40 +0100
Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Joe Perches <joe@perches.com> - 2017-01-27 20:50 +0100
Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Dmitriy Pichugin <smokeman85@gmail.com> - 2017-01-28 13:00 +0100
Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Johannes Berg <johannes@sipsolutions.net> - 2017-01-27 22:10 +0100
Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues Joe Perches <joe@perches.com> - 2017-01-27 22:20 +0100
csiph-web