Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1654637pxb; Wed, 10 Feb 2021 13:26:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzB1O2vcevwPeGRU+4vY7RmSqL3ax9kiq/jL9mUX9H0ckFbpcfL5Vt6Y7k7sGfT7jKu7hLb X-Received: by 2002:a17:906:d10d:: with SMTP id b13mr4959204ejz.438.1612992380038; Wed, 10 Feb 2021 13:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612992380; cv=none; d=google.com; s=arc-20160816; b=ColVbQJEjqF3KY/IjKhXgx5bVAt19u1qdEPP6PDev3w8FfFexYHrrDQnlQqr8gKHwA gGx2N6Mgy10TUnnYxANna5pToZQB/rIooCUYF08fjQmb2NgAY19DIh47+GRZhrFqG7JD +DCOZPNOE866byxQyXfuetXHlkAg/IuJLJUzq8hUaS/qxJy42ALUmvQjpf4JbbLZyprp 8pAXQluzSs3hrx16oBrUmsLKNOOvMm8o0pfpx8+kH8ph+BN3KYZ+oo1xG3gDvZiB7moM dZa7YAtNZms4af/BpmKoL2eFdW4kBNG0npf5ej1IietHNmS+R+A3pxjHcNVyzuwL+6iQ PY+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VmbmOG1RvWgMmrfMbgNf26feXFao3UuT1VTN22bup7c=; b=dCh1PxPEwN8cizdoibJD02ei0tIyFeDv2gSqjXYA3t6d/hQHJGqHvkJbIvCYDR//o5 L0xVa1LMcvtzPILCaPAFR/innf0+ryt4SuRNWp9NFH+kw4w0HeEPd0HH0IcsPUsRKVY6 5eJh34kodwV83Qt5kL4mOSTfLI2bhTIYanplgLkllMkL2nybsjdccfTPHnukSr5E4d+0 kbmf4mIs7iDkC8LyWenwvYBlOeT7Mp6TvQ5kLX73EyGTu+0FLhsw+v+9FGiqOF9WVl9o LngMV4qvIL+mJcdDEo4b7QfIvFxl0MYYA2SKq93nqXhjY53cu4Gr0uqPninvhPOKJRkU KLKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=DX0dBvf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si2045183ejf.749.2021.02.10.13.25.56; Wed, 10 Feb 2021 13:26:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=DX0dBvf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbhBJVW0 (ORCPT + 99 others); Wed, 10 Feb 2021 16:22:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232879AbhBJVV6 (ORCPT ); Wed, 10 Feb 2021 16:21:58 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A053AC061788 for ; Wed, 10 Feb 2021 13:21:18 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id 8so1924898plc.10 for ; Wed, 10 Feb 2021 13:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=VmbmOG1RvWgMmrfMbgNf26feXFao3UuT1VTN22bup7c=; b=DX0dBvf4d+R7lQL1Ms5GhYCTcBz2ZuWktobEUOjmyGUOZaB4wueIuhiYutLJlarVl5 N57PH6CnMoyo4mtoUf6OB3LCfdwPTKVrDt9Vs0yDAk5rnANFl8U6YU6ofHlNTLoxSBuQ 2rbTFgn4Q++/Nlhkmd6Z/gKXl/84cTWwPFEzm+Bx1hsazB6qhHIfX3al1/GirfXMXTCy MIB0HRkfGuSyeQprW6LJG0fWHYL6FE7Bw9MxxEIb5joy1c3HF6B5AE9xukxtYZRPSNTk E11JjmwVqul6Gv62mS/AreNj8V1arybgM10A40W6djXI+irCsSUHcI6nGBxAzKF/2ZXY lGqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=VmbmOG1RvWgMmrfMbgNf26feXFao3UuT1VTN22bup7c=; b=C5XqMk6jPlPN6k7EQL8bJ+PljOrC8noio0A6nDvqChIeUXF9f/OsYKZ7H5B6rQafoH I8xYbtIw5Uqkg4eoHXf9XX93pmGPZGhUmwculoToOUlHXUJoOtWsEszNsScq27s+DIQ0 sHMF2qNVDeVLIFdtd7MP0Tkka6TN6PwX/QcA6EsT5dw1ywvmtrAK4Wh7GlqTgDbsG/Ux I63AK8aReirjqte88bweHffQr2P0A+RorD+qbCljHQasoB8x8+vQOb1V9LgcFpSjWFkV +1/xhaHGRRVUgXYfrSJLyC2fY7EaNYxV3VSP1uD2w+1zIw68XdArdX2fwOEirMVh9TAw Q7Gw== X-Gm-Message-State: AOAM532b6uSg2qkXu5hHeGuNuzL3P1LlFmd4QFplrD6xp/zoRpEZAPBS t2MLunoieWyfdA7E9TiDqUzREQ== X-Received: by 2002:a17:902:9a92:b029:e2:dbb6:7442 with SMTP id w18-20020a1709029a92b02900e2dbb67442mr4776919plp.50.1612992078158; Wed, 10 Feb 2021 13:21:18 -0800 (PST) Received: from x1 ([2601:1c0:4701:ae70:7b19:df69:92d6:528e]) by smtp.gmail.com with ESMTPSA id d10sm3089068pfn.218.2021.02.10.13.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 13:21:17 -0800 (PST) Date: Wed, 10 Feb 2021 13:21:15 -0800 From: Drew Fustini To: Joe Perches Cc: Andy Shevchenko , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Tony Lindgren , Alexandre Belloni , Geert Uytterhoeven , Pantelis Antoniou , Jason Kridner , Robert Nelson Subject: Re: [PATCH v2 1/2] pinctrl: use to octal permissions for debugfs files Message-ID: <20210210212115.GA216435@x1> References: <20210210074946.155417-1-drew@beagleboard.org> <20210210074946.155417-2-drew@beagleboard.org> <87437daafdd86fa5c765ff9b17b6c7b097f0c317.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 04:36:00AM -0800, Joe Perches wrote: > On Wed, 2021-02-10 at 12:18 +0200, Andy Shevchenko wrote: > > On Wed, Feb 10, 2021 at 10:30 AM Joe Perches wrote: > > > On Tue, 2021-02-09 at 23:49 -0800, Drew Fustini wrote: > > > > > > - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO, > > > > + debugfs_create_file("pinctrl-devices", 0400, > > > > ??????????????????????????debugfs_root, NULL, &pinctrl_devices_fops); > > > > > > NAK. You've changed the permission levels. > > > > NAK is usually given when the whole idea is broken. Here is not the > > case and you may have helped to amend the patch. > > NAK IMO just means the patch should not be applied, not that the > concept is broken. > > > ... > > > > > And you have to keep the S_IFREG or'd along with the octal. > > > > Perhaps time to read the code? > > https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L387 > > Then the commit message is also broken. > > > > checkpatch does this conversion using this command line: > > > > > > $ ./scripts/checkpatch.pl -f --show-types --terse drivers/pinctrl/*.[ch] --types=SYMBOLIC_PERMS --fix-inplace > > > > NAK! See above. > > The command line above is for octal conversion of the symbolic permissions. > > Any other conversion would be for a different purpose and that purpose and > should be described in the commit message. > > Thanks for review comments from all. I will change from the incorrect 0400 to 0444. As for S_IFREG, it does seem like leaving off S_IFREG is the most common case when using octal permissions with debugfs_create_*(): $ git grep debugfs_create drivers/ |grep 0444 |grep -v S_IFREG | wc -l 302 $ git grep debugfs_create drivers/ |grep 0444 |grep S_IFREG | wc -l 9 As noted by Andy, this is okay as the S_IFREG flag is added to the mode __debugfs_create_file() inside fs/debugfs/inode.c. I will note this in the commit message. Thank you, Drew