Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3296701pxb; Fri, 12 Feb 2021 14:47:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUxs0OZ9D/UO4Kn4jyl7xGQPSHgU3cs5zXLX+4a8oKn9mb7wM1St4lW1P74HN56uVDVITe X-Received: by 2002:a50:ccc1:: with SMTP id b1mr5792776edj.307.1613170033433; Fri, 12 Feb 2021 14:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613170033; cv=none; d=google.com; s=arc-20160816; b=SSINNIKZ8OJpYI8LVGuPs0jrt10N3qJBwix6e9ZCeT+CppI44BX/hLRwlU5XYvqxIe 6Il7/CIWBplByrb2CAeEFrDBU8oOfpXKGaBkzEg7CFlnv/5AfErp/sUfoFSNW45L4tIe ZlAXxoFFn1VmgBRQ/1XNzzasfj6bFjrqmblwg84fi3o/igpF8F1g0jNWPHtI9u37udzI ZaMHUEsYSOABGHAsK5Bnf0O5rmoe1f2cq8/Gb1YPbVx8NR3SFmkNgxNb3N5Mw+x+eVG0 aDquY/zhq/o7cXItEAdD8EVZk/6VsUIoKkAUGGdZctcGGOM8v64RvtSa+9Xk3/wY/KtU GNEA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EtGVAUlLf8aLYkc++oRhj8gK5LOTNM2SSYR/xCv8u5o=; b=x9f0oqP3Jvnko1xV/qtEDZsW9g7GWdTdUprLbXtmIJ2ZLY8tPlby3c0xBt5w1Pe0I0 cKP8iAx1whHmkeF3gOr65WEYiVcdcbpk+NAtaJZF6ZABn4xH0pcH1Ce2op+Ce/ufzrx3 fIVr8B/8JGAcigB6+d8GbtQWqYzNZUHUuNC1MuVxCJNBK9n7Fo56qdQN4hFUBgMaOB4H uZ7yFWGAMFjKqD2Quk7IEZD8RORGbyPKApxhxC2vejvK7Os8kA5hwVkSjpysLr9xWYSF +6IZ3kSMNjoXXpbD5wtu3I5tosoHqmpyHmjj+WQV4rxwkYZ1GJWtc3dieONganBUxC9l SbXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=tiZXYcAs; 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 o9si7333614edw.190.2021.02.12.14.46.50; Fri, 12 Feb 2021 14:47:13 -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=tiZXYcAs; 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 S232272AbhBLWoD (ORCPT + 99 others); Fri, 12 Feb 2021 17:44:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbhBLWbG (ORCPT ); Fri, 12 Feb 2021 17:31:06 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9BE4C061786 for ; Fri, 12 Feb 2021 14:30:25 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id q20so379031pfu.8 for ; Fri, 12 Feb 2021 14:30:25 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=EtGVAUlLf8aLYkc++oRhj8gK5LOTNM2SSYR/xCv8u5o=; b=tiZXYcAs/7pEhDBWa/gzuvr3n5oQyF+cibs0ROTtAobCeuLquR/2BazkGfRA/USeV8 tj+kIdYVtytTaLDNcm+lTH+ZiF1LLUx1n3YId4boywCo1GuxlpdJvKZSxu5SzFUloCxl RM8vIlbzRUyYB7/jPKyz73lU4l2z0sf4nTcxmJaquvhFAZrftgUO0xpzcR+lvWXv+Y9/ XnyFsWa/hkUCxelLhwpq7g/nCMoCwSeknqu2os7Ngrtg4evsR6Ly+osAswM7J5dnEp4l EOGLUOfaQdgZvVfJ/iG+zdv2uDwZovJRdZqaCOnqpFbDbAVnpEG6mR5vzS0Ztf3L7iDP YyFA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EtGVAUlLf8aLYkc++oRhj8gK5LOTNM2SSYR/xCv8u5o=; b=RNV028L8jwIw9g4GPz7hSqNLAPx54G57dzbzZwGITXvFt+c0iAmvxgtV2L3w5GGq0V lS+FtINtwzJ1cl9cQrDJn1mDsYEHn9aOPMVhYgzz61ZLzSS5JTt2rSNgudFjh0t85G+a 33zgbdT4rEiVJYglPqz+JRKNCXACQCLh7GwXIkcusCWQPXvbqXo0IZRijxOr94FRxs2N dclPGOXeQn4xwrdJrvRUK6gBt0CcUmk/yq1ufX69d/Ufis4ERbSOkZf0h7fCYspTjrxg ahuHdpYl6CI+emQEDQOxSDupCGyV9NH4ohqWqksgeRMg6joLmaETLjjhm+07kbpCVY2x NCDg== X-Gm-Message-State: AOAM531HSXvm3bzWK0zsoEJB+2BuCamqI/7HbEEIhA8jzo7hhM5lX+Dj hVGvvzqL6cz91A4IbXCnNkL8lqMH77qTYw== X-Received: by 2002:a63:1d4d:: with SMTP id d13mr5089194pgm.103.1613169023575; Fri, 12 Feb 2021 14:30:23 -0800 (PST) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:55c2:10c0:c1dd:8558]) by smtp.gmail.com with ESMTPSA id j26sm9530351pfa.35.2021.02.12.14.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 14:30:22 -0800 (PST) From: Drew Fustini To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Lindgren , Andy Shevchenko , Alexandre Belloni , Geert Uytterhoeven , Pantelis Antoniou , Jason Kridner , Robert Nelson , Joe Perches , Dan Carpenter Cc: Drew Fustini Subject: [PATCH v5 1/2] pinctrl: use to octal permissions for debugfs files Date: Fri, 12 Feb 2021 14:30:14 -0800 Message-Id: <20210212223015.727608-2-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210212223015.727608-1-drew@beagleboard.org> References: <20210212223015.727608-1-drew@beagleboard.org> 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"). Note: S_IFREG flag is added to the mode by __debugfs_create_file() in fs/debugfs/inode.c Suggested-by: Andy Shevchenko Signed-off-by: Drew Fustini --- drivers/pinctrl/core.c | 12 ++++++------ drivers/pinctrl/pinconf.c | 4 ++-- drivers/pinctrl/pinmux.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 3663d87f51a0..07458742bc0f 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1888,11 +1888,11 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) dev_name(pctldev->dev)); return; } - debugfs_create_file("pins", S_IFREG | S_IRUGO, + debugfs_create_file("pins", 0444, device_root, pctldev, &pinctrl_pins_fops); - debugfs_create_file("pingroups", S_IFREG | S_IRUGO, + debugfs_create_file("pingroups", 0444, device_root, pctldev, &pinctrl_groups_fops); - debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, + debugfs_create_file("gpio-ranges", 0444, device_root, pctldev, &pinctrl_gpioranges_fops); if (pctldev->desc->pmxops) pinmux_init_device_debugfs(device_root, pctldev); @@ -1914,11 +1914,11 @@ static void pinctrl_init_debugfs(void) return; } - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-devices", 0444, debugfs_root, NULL, &pinctrl_devices_fops); - debugfs_create_file("pinctrl-maps", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-maps", 0444, debugfs_root, NULL, &pinctrl_maps_fops); - debugfs_create_file("pinctrl-handles", S_IFREG | S_IRUGO, + debugfs_create_file("pinctrl-handles", 0444, debugfs_root, NULL, &pinctrl_fops); } diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index 02c075cc010b..d9d54065472e 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", 0444, devroot, pctldev, &pinconf_pins_fops); - debugfs_create_file("pinconf-groups", S_IFREG | S_IRUGO, + debugfs_create_file("pinconf-groups", 0444, devroot, pctldev, &pinconf_groups_fops); } diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index bab888fe3f8e..c651b2db0925 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", 0444, devroot, pctldev, &pinmux_functions_fops); - debugfs_create_file("pinmux-pins", S_IFREG | S_IRUGO, + debugfs_create_file("pinmux-pins", 0444, devroot, pctldev, &pinmux_pins_fops); } -- 2.25.1