Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3649835pxb; Sat, 13 Feb 2021 04:58:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxghSxgxJotZarOdeK0vYEKvtTpeUVlfwKLCDJrVi835LjMZjEBesYXAkHjJ9mzSsCWlMm5 X-Received: by 2002:a50:fd14:: with SMTP id i20mr7730560eds.26.1613221114344; Sat, 13 Feb 2021 04:58:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613221114; cv=none; d=google.com; s=arc-20160816; b=wDq6P635HSICqW6k8W9csV75wV0zOYiuqYTISZ2KMQ5D1q9TeIz2I/v0jIBl3kuF8N 501nYQlL3cREv4eqx/erCc2uN6rZWykNmWWYVskXytI2IlVkIQzmwJcs961RNRw/Jpfh M2TZWxzKba0ABcxk68JUQS0ZjE8Yk8yDc+xiJrAEQAggLcdys7b9C5W7fRYCb5f/VWUi ls84qYf8VmG0tyEN/UiIHpmOC8o8rfpf2VPpZhplN/uClakFhgpPvz3sJlZpYFAhG2D9 uMXrf3JLYQu1fb0Zi3jsyWMGDpjxJwGELTwTmrXsmw8G+i343XeQXB+lC5d0ItooAmTc f6sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qWsg69klgTq0z5peBmz3Nu2NfWKwsbvB2uqhVC/C6s4=; b=F7KV4razvEk9WY6l93hfS6lKIUFS0YfoAkglY7KSdUOuBfrOMbA0oMmOhfofTATKJF akLngsRZGvo3LcgaUZmTcYTRL7jNYFjgiNYoSxo3LPdGUtiDI1gY/UydS2Av2uXH8ysJ OLeSAzlQbEO/WWv9jaaoWZwJlNBzIirs8Q+E04RYIH14hBy++bk89aeDnb+eU/9nu3F4 C9A/3wHJkoSo+1joVRwhGcvUOoisVXG/v/UGVnvch6QvKO4teCs9C1C0vu/Wk/C09mzT tsMdeN3ZrBCgQqteaAfNu9GNhaCek+71W0icWzt0xZksbUIJFAd2ZK69/06v04TTWbAs mpUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NEWkRNai; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jw10si5239783ejc.357.2021.02.13.04.58.10; Sat, 13 Feb 2021 04:58:34 -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=@gmail.com header.s=20161025 header.b=NEWkRNai; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbhBMM5n (ORCPT + 99 others); Sat, 13 Feb 2021 07:57:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbhBMM5i (ORCPT ); Sat, 13 Feb 2021 07:57:38 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C4D1C061574; Sat, 13 Feb 2021 04:56:58 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id n10so1430422pgl.10; Sat, 13 Feb 2021 04:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qWsg69klgTq0z5peBmz3Nu2NfWKwsbvB2uqhVC/C6s4=; b=NEWkRNaiKUDw4mfcStj5Cc1nf4lZFfhPpwDmoryH157v3eMuAY1TeUsNXdOvGNwzQP ma65G8berz4a0XRW8OdojSkUDOAPOReNRU2Un0lctBFlQYmG6lCuI4LQeq71juWqZNm5 KxhnxkbH4tX6VCKVjWoZWQauu9y2JIGK2TmoaeDPBB6PChH2mYO7LAG04Bh1xujIBJ/O b75H4y4sogPjTIFzcRND+oWoUXNTyryfs0Nxtm+K99tl2+lSVjUvKcCK+kHQVQvB+K/r kSRkjO2rr/JfdRVFV6omCoamdvBJPNEZ+OT5SdA/Esrr14AHWMbYoXgDVQRj8VZ8FoNj HTrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qWsg69klgTq0z5peBmz3Nu2NfWKwsbvB2uqhVC/C6s4=; b=Vzy6k3oYt7iAAJQIadTjvwrIwtiLqRqaJFpg3o8/yInOr2pAJyiHzy1k+NXVOYLFJQ CSZZCfLWSrmHsBja59pvw/qH6ZhQWnQNWZXeSJtVoFxaB3uoYYNt/7/KxWIjmlB1xCNE D40dz/iPIbcdRn3z75LOrsgsmGGF1TQkwg8eVOSzalbjt9v/M9mVXuHd7ABD0pppLWZG 7bqOJ9jws8EQ2JwUBwruX65cE5naAhDD9yql+dpaS8uFJPVtiCY90Ir/rltAUue5ICZh K7qCPtTDyeWWd/adSwrBGOHxJJlcNkPWgOWxK8I5sETxyB74GhCBPiQJO+BrCc+Xcv43 he6Q== X-Gm-Message-State: AOAM530pe+IQ2sy1K3iNN2p9C0N8ltvAzXLxvEhVc0BfEZTYAkmd1CwW fxqtceSDuCEpZvifkDzhRXXUyMOJO3YLv7FHAM8= X-Received: by 2002:a05:6a00:854:b029:1b7:6233:c5f with SMTP id q20-20020a056a000854b02901b762330c5fmr7505905pfk.73.1613221017699; Sat, 13 Feb 2021 04:56:57 -0800 (PST) MIME-Version: 1.0 References: <20210212223015.727608-1-drew@beagleboard.org> <20210212223015.727608-2-drew@beagleboard.org> In-Reply-To: <20210212223015.727608-2-drew@beagleboard.org> From: Andy Shevchenko Date: Sat, 13 Feb 2021 14:56:41 +0200 Message-ID: Subject: Re: [PATCH v5 1/2] pinctrl: use to octal permissions for debugfs files To: Drew Fustini Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Tony Lindgren , Alexandre Belloni , Geert Uytterhoeven , Pantelis Antoniou , Jason Kridner , Robert Nelson , Joe Perches , Dan Carpenter Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 13, 2021 at 12:30 AM Drew Fustini wrote: > > 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 I guess it also needs Suggested-by: Joe (IIRC he proposed to convert the rest). Nevertheless, Reviewed-by: Andy Shevchenko Thanks! > 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 > -- With Best Regards, Andy Shevchenko