Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1694410pxb; Wed, 10 Feb 2021 14:35:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpIJEMOE9VuGindcvlCtvARIfUbLO5jQQStsizW+pzXun7FnA/SJz75Ut1zQEGObCUwZqX X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr5093932ejb.495.1612996524684; Wed, 10 Feb 2021 14:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612996524; cv=none; d=google.com; s=arc-20160816; b=C7feAIxjMJ8yvhqwqXELCp1UjVhGW62yxdyFRu2oFsHwq0SvnbEgZQn85N4iKpPFic cYsGn4IaZvt7lKghdZpDkTkSN68UiY+kk3bbsTWLyy1tpd2nxQ1R/ss54mrV0NiM2VIt Kaw1UJYh3flHaILlCOVozyvcaQoE8uTVS+tj8gLPPfBeZG4IXSvqJ2vxw0PGlX2LUj7W iI6F+TXxnJ19fDocgRmYBAuMMl6NMZOyhV2CsqZPRrJ5HgBgzvxUhVhVqOwD787Q1or9 HZh8fblUo56RrB8Pvo9qTSxcGFmV2x5Rzngu46/RqG0ogV0CLnJlZRQHbrmvBqlErsF4 zUEQ== 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=/XYPeyR2vRFmwC1dUrzuhuASZmzYtfr/DToN2nYAQ80=; b=cZ2aobAb3i/CQJnwemmydzXDrpZXfmbGzp570jaz5IAh6qnzzt2O8x8y11A7zzKCoN nWSNvrRz3wo9BesXGRXXh77VUwa/8WzkjiLKcRBX8tfz6/0FgmU/xxBZVmQxpNuwFaxR 34PxRilXO4gLpQLJxRHVkPNetQBKjasP9qp0TrDDDuZ8ayP9cJOKDbBIqaCTrAU6yb+t KbdM1TLIxNcd8kgk3zoTzZRYNbkDFQBY/USnWHPTaNhevFw1px5BPpsdUWgcka8BIu5y 5Ey0oQCCjVO/OtKKjY0RBnxAbyUP7ZSlY4O9RBdAWjgPUyk0Z3AYnB3DZxymK7gtTxs+ U0bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=JYu+9KU8; 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 ay23si2242408ejb.33.2021.02.10.14.34.59; Wed, 10 Feb 2021 14:35:24 -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=JYu+9KU8; 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 S232920AbhBJWbv (ORCPT + 99 others); Wed, 10 Feb 2021 17:31:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbhBJWbt (ORCPT ); Wed, 10 Feb 2021 17:31:49 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C67C061574 for ; Wed, 10 Feb 2021 14:31:09 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id d2so2021491pjs.4 for ; Wed, 10 Feb 2021 14:31:09 -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=/XYPeyR2vRFmwC1dUrzuhuASZmzYtfr/DToN2nYAQ80=; b=JYu+9KU8OR3CRBu+ZQaE8wJn23ZIbkLjdlwgnV1EWOim2EUy4SoX7HUHD1uJxRfTXV cEAQtPZ5efXsYCZGY83A+0Sjs8fqSm59x5WGTrwv3CMjy/z393lM+FqP6LVc5GrmjU9N LxTVh55i/QTBVfXREXIux9blFUkBcwen//hFOoc8nSHyXEkn8YGNIAF9M+886/aQgdKl 9PV6+EBgvjqaK7+y04wwsNU9+9L8uGUeOynqlFDY4Tm+/GSV6FPm4QQ4byYJDzMZH/mT tkDgDWzygS0mkr6kPs/ypbj+izckCvEIoRlyNs7mNEUtGUCmll0JK8eufivhPQJUnJ+o Pfpg== 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=/XYPeyR2vRFmwC1dUrzuhuASZmzYtfr/DToN2nYAQ80=; b=Lw26ORTJieJvKYuROGHq5moTzy+zcDUR7HsRxzJ+QviCgWSL/s1SqNMGkrLInFDXnl a03tRiT2OPLdAOuoODseZjnUNyCRB60lSOx5I6rGIC3F+/ecyJmI+hmq8CXOxyeg3gnW J9hKafJWENw4jcN61PImgQ5YKg8z+NXI/ZJ7yWKijoChYjjxjF/o04Ur0TbdsNF+Pgvv N93haMM06yoA85Zh/ydM/g56M75yNwpBApQ0HmXuld4yNZiSreDXJxWs201KqbALSTJ6 X7t6vfwe01vib4krmBMicGElWhwflU+1TPCELv7rTcyEMdnxbeRJnQpb0ACQxPqYUHbu S4Gg== X-Gm-Message-State: AOAM532Vnk9uEEluWR2YbSbyYMaq2xCbBZ3ADIOyWdrjbyuw5jkJ7RB9 mA6X9CHuRdCyFpQ0WoDvJz3m+Q== X-Received: by 2002:a17:90a:67ca:: with SMTP id g10mr1123718pjm.28.1612996269324; Wed, 10 Feb 2021 14:31:09 -0800 (PST) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:7b19:df69:92d6:528e]) by smtp.gmail.com with ESMTPSA id t17sm3686307pgk.25.2021.02.10.14.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 14:31:08 -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 v4 1/2] pinctrl: use to octal permissions for debugfs files Date: Wed, 10 Feb 2021 14:28:52 -0800 Message-Id: <20210210222851.232374-2-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210222851.232374-1-drew@beagleboard.org> References: <20210210222851.232374-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 | 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 3663d87f51a0..02f8710afb9c 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -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