From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbdLJW4u (ORCPT ); Sun, 10 Dec 2017 17:56:50 -0500 Received: from smtprelay0204.hostedemail.com ([216.40.44.204]:48070 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751420AbdLJW4t (ORCPT ); Sun, 10 Dec 2017 17:56:49 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:69:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:10004:10400:10848:11026:11232:11473:11658:11914:12295:12296:12438:12740:12760:12895:13069:13071:13161:13229:13311:13357:13439:14180:14659:14721:14777:21060:21063:21080:21326:21433:21627:30022:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: kick22_5873170f62447 X-Filterd-Recvd-Size: 1474 Message-ID: <1512946606.26342.21.camel@perches.com> Subject: Re: [PATCH] checkpatch: don't require octal permissions for "0" From: Joe Perches To: Bartosz Golaszewski , Andy Whitcroft , Andy Shevchenko Cc: linux-kernel@vger.kernel.org Date: Sun, 10 Dec 2017 14:56:46 -0800 In-Reply-To: <20171210140401.7698-1-brgl@bgdev.pl> References: <20171210140401.7698-1-brgl@bgdev.pl> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-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 Sun, 2017-12-10 at 15:04 +0100, Bartosz Golaszewski wrote: > If the permission value is 0, don't raise the NON_OCTAL_PERMISSIONS > error. There's no possibility of an error if there are no permissions. Hi Bartosz This response below is the same as another email thread ------------- Personally, I prefer 4 digit octal in most cases as it shows the coder knows that the argument is a permissions use and not just some generic 0. There are not many uses of 0 for permissions outside of module_param*. I suppose all the variants of module_param calls, as a 0 there is specifically a "not to appear in sysfs" flag, could or should be excluded from that octal test.