From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751251AbdA0Tsr (ORCPT ); Fri, 27 Jan 2017 14:48:47 -0500 Received: from smtprelay0211.hostedemail.com ([216.40.44.211]:34887 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750825AbdA0Tso (ORCPT ); Fri, 27 Jan 2017 14:48:44 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3871:3874:4321:5007:7875:7974:10004:10400:10848:11026:11232:11658:11914:12438:12740:12760:12895:13069:13141:13230:13311:13357:13439:14181:14659:14721:21080:21325:21433:30029:30051:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: ring44_4b4a7b0911834 X-Filterd-Recvd-Size: 1679 Message-ID: <1485546515.12563.138.camel@perches.com> Subject: Re: [PATCH] cfg80211 debugfs: Cleanup some checkpatch issues From: Joe Perches To: Pichugin Dmitry , johannes@sipsolutions.net, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 27 Jan 2017 11:48:35 -0800 In-Reply-To: <20170127192603.GA13522@gmail.com> References: <20170127192603.GA13522@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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