From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755748AbdDRIQp (ORCPT ); Tue, 18 Apr 2017 04:16:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41984 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755614AbdDRIPw (ORCPT ); Tue, 18 Apr 2017 04:15:52 -0400 Date: Tue, 18 Apr 2017 10:15:43 +0200 From: Greg Kroah-Hartman To: Martin Kaiser Cc: linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry Message-ID: <20170418081542.GA2051@kroah.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170418075131.GA15328@botnar.kaiser.cx> User-Agent: Mutt/1.8.1 (2017-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18, 2017 at 09:51:31AM +0200, Martin Kaiser wrote: > Thus wrote Greg Kroah-Hartman (gregkh@linuxfoundation.org): > > > > - ret = proc_create("misc", 0, NULL, &misc_proc_fops); > > > + ret = proc_create("misc", 0444, NULL, &misc_proc_fops); > > > What checkpatch warning does this fix? 0 is a number :) > > 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 requires you to use your brain, it is but a dumb perl script... greg k-h