Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4202707pxb; Tue, 26 Jan 2021 15:30:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzl1xoaOdZ0tytOEa4PuWCMVFLVtPAd7Q30Euc/HnZ8MyXwZ7Zf2H1kToov1Eb8KzkG3uQ6 X-Received: by 2002:aa7:d0cf:: with SMTP id u15mr6449330edo.115.1611703808770; Tue, 26 Jan 2021 15:30:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611703808; cv=none; d=google.com; s=arc-20160816; b=jlOEgL1Lm64QqtfVB72CNn4uWkLPxdVucCkO/3aVIjdtVaYp/Aj1cYMuqaWtWBtpPg YGgnGCQwFeMklXoeM7Ujr+X6NoSz1+n11cMeRBXQ+UBVm8fL+t/jAfHDSWAgeUaRmtPE nhb/msxVYaztRb4nDT3aUBVytwXGDazp1ULVLU0YpCaV2UxLMASK61SloqgLvc/NRn5U JidOzNZ6ygtYKtW3+GYXV+3o5JINM9NuvEvhNuP2wp28VE7Yv8f3XkZAYXDBM4sCjSBf WR87nwE9SQ4acsOAuNwiMeN8znJi2pqcoy3f2T/sl9xsK4xKQVJU2M8dVXvZV9W05IXG pZJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=A+xo3PRCK79jj+xfn6kKZjOBkB350fZ6rhjD6DI0rxM=; b=EiSBnJvXt0/yRbbDDhsNYeOaBkepChzXUIuGb/r1Cd7ghl+uDxeVM8e7i1Gk0Wb7Ac n/GJlIUc+j7qygi+CsL0D6klCo4/UBrovNrnkgUm34D6nRU0zk/88DgOCcusgmhjHL9O lTIEMe4XDN4wyczinal3I+LQQVtkCWsT0H6xgZPNxVbD+U2YvPRlVZ8+ghV66zIIEGL9 Pyx/eZl21v0iRxU+TeA/NVcj7r/1A49rZlyN2iV6prAI+rtYr8UK1wF3EloHhC8cGvZc r3f46udJj2U0AZw5gdnJFwp5MFyNZJ1OSe3NXJr/CEmO+2Vw5MNhKmXxJCrFL2mOCzbE MOFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=kaKvwXbF; 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 k9si78791eje.254.2021.01.26.15.29.25; Tue, 26 Jan 2021 15:30:08 -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=kaKvwXbF; 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 S2387485AbhAZXNF (ORCPT + 99 others); Tue, 26 Jan 2021 18:13:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726654AbhAZE42 (ORCPT ); Mon, 25 Jan 2021 23:56:28 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B42FDC06178B for ; Mon, 25 Jan 2021 20:55:48 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id u4so1512188pjn.4 for ; Mon, 25 Jan 2021 20:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A+xo3PRCK79jj+xfn6kKZjOBkB350fZ6rhjD6DI0rxM=; b=kaKvwXbFyAqpP+UiSlZHnfAvyZd0+zaC9/ULW7J9CZ8k5c5TNv3C/A5++Y44n26s2y hjR+apqEBKBZXB81WFZKHS3B4MrT3rJf+NCxEwUQuTcgwX8I2Ic5fekdrEA+1Nmktf4D ZjscnZ/ois3yHlG1tx/J3ou6WFyFi/ShtabzjPw7uaX0CfEImEwIq9bbuv+bOzc1v26B MaxopG4mbe+Nf01wgTfNinsgom/t/Dl348pl+S6eJ456SV+hMs0hKsvPRGWX4MuLWkQJ PQw6plwMCJcVk9/2fYBEzB8ZzgVReqky4YRsB6E4oBiU4dubvhCEsAzFGYmfZZGYGpT8 tFcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A+xo3PRCK79jj+xfn6kKZjOBkB350fZ6rhjD6DI0rxM=; b=b4gLtfJPqEucWgqwRk54PznGu1YyshOd/SpSAx9k2FTu4dU15czwb7IZ+b/38lFFuX UJxHttkYhBGTvt2+RN8jdZcScBql2blR7BFT3hv1vYnhey5tLfHP7iez5BfUHO35Ygm/ IKcTYDMkRXzUhSdjXUNKp0/dhYiwislGrBc53+PWyRSfLx+lnSvNhNcZjyXoA2YIgQKN Qj7kScoHdbRFYZlVMicWXowSJoxcBN8pKICsRjXZtcU0kSfSG8JHmQwe4ml2qdLy9kIS 7HhXVlLMMpQI8JH/YV1G2TJXpjQcAOlQSnHXaYWbjedumtorIRIW8AUVqrzL1kEu5gjo 9mog== X-Gm-Message-State: AOAM530O61H228ahDiI+937qDtwD3U1iR2nUsq9BYRoU7HLrGFmx577Y +zg4VLcO+nD74uQiQzrr9kr5DA== X-Received: by 2002:a17:90b:3682:: with SMTP id mj2mr4029939pjb.9.1611636948198; Mon, 25 Jan 2021 20:55:48 -0800 (PST) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:dd5e:ff29:33fe:cad2]) by smtp.gmail.com with ESMTPSA id gw20sm858796pjb.55.2021.01.25.20.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 20:55:47 -0800 (PST) From: Drew Fustini To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Drew Fustini Subject: [PATCH] pinctrl: use to octal permissions for debugfs files Date: Mon, 25 Jan 2021 20:47:43 -0800 Message-Id: <20210126044742.87602-1-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch over pinctrl debugfs files to use octal permissions as they are preferred over symbolic permissions. Refer to commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead"). Signed-off-by: Drew Fustini --- Patch note: - I learned about this preference of octal over symbolic when I created an RFC to add a new debugfs file ("pinmux-select"). I am submitting this patch to switch existing entries in pinctrl over to octal before I submit a proper PATCH for the "pinmux-select" functionality in which I will use octal permissions for the new file. drivers/pinctrl/core.c | 6 +++--- drivers/pinctrl/pinconf.c | 4 ++-- drivers/pinctrl/pinmux.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 9fc4433fece4..791736b2de77 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1916,11 +1916,11 @@ static void pinctrl_init_debugfs(void) return; } - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-devices", 0400, debugfs_root, NULL, &pinctrl_devices_fops); - debugfs_create_file("pinctrl-maps", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-maps", 0400, debugfs_root, NULL, &pinctrl_maps_fops); - debugfs_create_file("pinctrl-handles", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-handles", 0400, debugfs_root, NULL, &pinctrl_fops); } diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index 02c075cc010b..f005921bb49e 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c @@ -370,9 +370,9 @@ DEFINE_SHOW_ATTRIBUTE(pinconf_groups); void pinconf_init_device_debugfs(struct dentry *devroot, struct pinctrl_dev *pctldev) { - debugfs_create_file("pinconf-pins", S_IFREG | S_IRUGO, + debugfs_create_file("pinconf-pins", 0400, devroot, pctldev, &pinconf_pins_fops); - debugfs_create_file("pinconf-groups", S_IFREG | S_IRUGO, + debugfs_create_file("pinconf-groups", 0400, devroot, pctldev, &pinconf_groups_fops); } diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index bab888fe3f8e..7f6190eaedbb 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -676,9 +676,9 @@ DEFINE_SHOW_ATTRIBUTE(pinmux_pins); void pinmux_init_device_debugfs(struct dentry *devroot, struct pinctrl_dev *pctldev) { - debugfs_create_file("pinmux-functions", S_IFREG | S_IRUGO, + debugfs_create_file("pinmux-functions", 0400, devroot, pctldev, &pinmux_functions_fops); - debugfs_create_file("pinmux-pins", S_IFREG | S_IRUGO, + debugfs_create_file("pinmux-pins", 0400, devroot, pctldev, &pinmux_pins_fops); } -- 2.25.1