From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756101AbdDRJN2 (ORCPT ); Tue, 18 Apr 2017 05:13:28 -0400 Received: from botnar.kaiser.cx ([176.28.20.183]:47982 "EHLO botnar.kaiser.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbdDRJMH (ORCPT ); Tue, 18 Apr 2017 05:12:07 -0400 Date: Tue, 18 Apr 2017 11:11:02 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Subject: Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry Message-ID: <20170418091102.GA17375@botnar.kaiser.cx> References: <1488234485-26111-1-git-send-email-martin@kaiser.cx> <1492453377-23796-1-git-send-email-martin@kaiser.cx> <1492453377-23796-2-git-send-email-martin@kaiser.cx> <20170418043110.GA30463@kroah.com> <20170418075131.GA15328@botnar.kaiser.cx> <20170418081542.GA2051@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170418081542.GA2051@kroah.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thus wrote Greg Kroah-Hartman (gregkh@linuxfoundation.org): > > ERROR: Use 4 digit octal (0777) not decimal permissions > > #285: FILE: drivers/char/misc.c:285: > > + ret = proc_create("misc", 0, NULL, &misc_proc_fops); > Come on now, think about what this is saying. Is 0 not also an octal > number? checkpatch is asking for a 4 digit octal number. And at least for me, 0444 makes it clearer what the permissions actually are. Yes, somewhere in the code, I can dig up that 0 is changed to 0444... > checkpatch requires you to use your brain, it is but a dumb perl > script... Sorry, I won't be arguing on a personal level. If you don't like the patch, feel free to reject it. No problem for me. Do you think checkpatch shouldn't be looking for exactly 4 digits here (and elsewhere, it has a list of functions with a permission parameter)? Best regards, Martin