Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp546827pxb; Sat, 20 Feb 2021 12:31:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuazVhoKnzhpdRw0K0QIwGV0YE5KUbYoBa9RB2kg2kKXgYN2k41KTs8seoUCSFpm21pVtB X-Received: by 2002:a17:906:5655:: with SMTP id v21mr13935613ejr.264.1613853084963; Sat, 20 Feb 2021 12:31:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613853084; cv=none; d=google.com; s=arc-20160816; b=wp93NNoB/QpEBJtzku/qz9uB5sM1S3AROMnrM8enNmFxFTDLe5Sbtwa2JWPZHbkd4h 79eqfc89OqmF+mg05jknBabLRsE0+/AlIUXKGwpcD5ODJuIwA7vuuYOm1+V2LwhEnCBg 6yDz1/Kvkmsh/hYxF/umdYd5Aa0G/koURvWOlFWIwnA35rUJm6X6US88yqIQl6i+d5o1 dVghp9lEwgBJC4T4InL5ypQGYJNvOC+RIzT3FAsqLngtmonDEUoTRKYI3X/dFEyFJxtv G30YN0aZ9EY8uQxO45iLRiHIuBjGLSNkW8SRU8Q1/pk0gpxPmAhmpPb2tCXIngWW6caw SrXg== 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=OBtTzri1cScqDnwkEDlkQhcrUhTCJcMkyhXW4hdMGZI=; b=Red+h/iVzXq9sJnI61EyJYA7r3NC/ZGaA+o/87eDvHdYY+jTbzMCgzsDASg4KtYY8f T7gDH5UpeQqOcOe1vLBOFd9gdmUcw43Shk0OJ6xQBkZgm4s3eZ63d1Xoz1YyI2ldMwtl GvFfcB9pDNbA3TUgRwbvi7+NdAylHOAMA3dT6sn5GVTkjwk628E1wFALnngxmc+VWF6b TQsMzEQPjkEZ4YEJIquDdOTZLl0fWk0Tl00qUEU1x44+s+GwU+nsK3O6qumgMjRn/nC2 gDsjwmB/t/rXALpurVySJkhgf8RyZezuo/T9dNv5IRRgxEfN0NgzZaHFOmMxDCLBn2XG wQHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=zmRlVRwy; 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 z22si7600315eje.542.2021.02.20.12.31.02; Sat, 20 Feb 2021 12:31: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=zmRlVRwy; 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 S229868AbhBTU2o (ORCPT + 99 others); Sat, 20 Feb 2021 15:28:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbhBTU2n (ORCPT ); Sat, 20 Feb 2021 15:28:43 -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 9FF97C06178B for ; Sat, 20 Feb 2021 12:28:03 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id t9so1073678pjl.5 for ; Sat, 20 Feb 2021 12:28:03 -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=OBtTzri1cScqDnwkEDlkQhcrUhTCJcMkyhXW4hdMGZI=; b=zmRlVRwyqIdZyO5J2dle6JUjid7RjcLyGcWR77bvZwb+Rl4DdAeYYH72ZL1i82pFDz M1qXAvOUmLAsg4ClDoqctzOnHRIEspEU5yqgTy6Dee5urYA2d9RDfNZaohOptWvKCUMS U7pI75ldQwGXI+KNAI/Fi4+BG4NrDZeWKLcuDOPPmVgd2ffJWeTf5YcY0vTQBvBmJt48 alBZ1Z+LzUHBHfafYJThAlgYjMM0fcQsrFy6ZZH5TWm5Vkd/+KTe1yUF5+dc1j3L6U+R bYAQtTdyILgnEXksyO8GvrgGKj2czIW2Zq8LWDWCRrl1XK+DaTVNdm9MNQ8DxgRsSswV muWQ== 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=OBtTzri1cScqDnwkEDlkQhcrUhTCJcMkyhXW4hdMGZI=; b=biuc3KPhbiUFoLhZBWFjlbDPEhiSObUip5vgvR1iipAiBF1ChOzWdHY1ZurkcAHQxE kXjSPRcRFf+hWFUeD9e2U88Mtlpi5rnqacA0UStuC0AVnQ3z+idP58wOVhCaT270axJ8 ee6putg6IJNsp3o0XF4lZgFsXUI8TSEla9iWevBxtVqRNFWV9bfOMWV3ZxUzhdWmUUL/ WznwdBoZhmb1C2+aM0ucldBcb/za714IRCaksrP1saSxLCDv0J0/Dkw+lAC1LhDzPuws WhcP5xvd9mFcBDJTnDIzQ8/sP8sgMwst/Ra3XG2U1pIjqxdkbtuMCT1FPUIm6BwapFu4 mHAw== X-Gm-Message-State: AOAM531nv2UhoDeuOrpRWh6voPJXgkLOwmp4QvPm3VuLLMoZYXtNyXjx 05qElH3n1E9rTJ9NMLvfKXVm4A== X-Received: by 2002:a17:90a:7e94:: with SMTP id j20mr15894904pjl.8.1613852883189; Sat, 20 Feb 2021 12:28:03 -0800 (PST) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:3902:ca9d:7b75:1d0c]) by smtp.gmail.com with ESMTPSA id 125sm13497871pfu.7.2021.02.20.12.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 12:28:02 -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 , Jonathan Corbet , linux-doc@vger.kernel.org Cc: Drew Fustini , Geert Uytterhoeven Subject: [PATCH v8 1/3] pinctrl: use to octal permissions for debugfs files Date: Sat, 20 Feb 2021 12:27:48 -0800 Message-Id: <20210220202750.117421-2-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210220202750.117421-1-drew@beagleboard.org> References: <20210220202750.117421-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: Joe Perches Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Reviewed-by: Tony Lindgren 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