linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Kelsey Skunberg <skunberg.kelsey@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	ddutile@redhat.com, bodong@mellanox.com,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH v3 0/4] PCI: Clean up pci-sysfs.c
Date: Mon, 19 Aug 2019 17:42:03 -0500	[thread overview]
Message-ID: <20190819224203.GV253360@google.com> (raw)
In-Reply-To: <20190815153352.86143-1-skunberg.kelsey@gmail.com>

On Thu, Aug 15, 2019 at 09:33:49AM -0600, Kelsey Skunberg wrote:
> This series is designed to clean up device attributes and permissions in
> pci-sysfs.c. Then move the sysfs SR-IOV functions from pci-sysfs.c to
> iov.c for better organization.
> 
> Patch 1: Define device attributes with DEVICE_ATTR* instead of __ATTR*.
> 
> Patch 2: Change permissions from symbolic to the preferred octal.
> 
> Patch 3: Change DEVICE_ATTR() with 0220 permissions to DEVICE_ATTR_WO().
> 
> Patch 4: Move sysfs SR-IOV functions to iov.c to keep the feature's code
> together.
> 
> 
> Patch 1, 2, and 4 will report unusual permissions '0664' used from the
> following:
> 
>   static DEVICE_ATTR(sriov_numvfs, 0664, sriov_numvfs_show,
>                      sriov_numvfs_store);
> 
>   static DEVICE_ATTR(sriov_drivers_autoprobe, 0664,
>                      sriov_drivers_autoprobe_show,
>                      sriov_drivers_autoprobe_store);
> 
> This series preserves the existing permissions set in:
> 
> 
>   commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control
>                         VF driver binding")
> 
>   commit 1789382a72a5 ("PCI: SRIOV control and status via sysfs")
> 
> Either adding a comment verifying permissions are okay or changing the
> permissions is to be completed with a new patch.
> 
> Changes since v1:
>         Add patch 1 and 2 to fix the way device attributes are defined
>         and change permissions from symbolic to octal. Patch 4 which moves
>         sysfs SR-IOV functions to iov.c will then apply cleaner.
> 
> Changes since v2:
> 
>         Patch 1: Commit log updated. Example shows DEVICE_ATTR_RO()
>         example instead of DEVICE_ATTR(). DEVICE_ATTR() should be avoided
>         unless the files have unusual permissions. Changed to reflect a
>         more encouraged usage.  Also updated regex to be accurate.
> 
>         Patch 3: [NEW] Add patch to change DEVICE_ATTR() with 0220
>         permissions to DEVICE_ATTR_WO().
> 
>         Updated series log to reflect new patch and unusual permissions
>         information.
> 
> 
> Kelsey Skunberg (4):
>   PCI: sysfs: Define device attributes with DEVICE_ATTR*
>   PCI: sysfs: Change permissions from symbolic to octal
>   PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO()
>   PCI/IOV: Move sysfs SR-IOV functions to iov.c
> 
>  drivers/pci/iov.c       | 168 ++++++++++++++++++++++++++++++
>  drivers/pci/pci-sysfs.c | 223 ++++------------------------------------
>  drivers/pci/pci.h       |   2 +-
>  3 files changed, 191 insertions(+), 202 deletions(-)

Thanks, I applied the new DEVICE_ATTR_WO() patch as the *second* patch
so the two DEVICE_ATTR patches were together.  I added Greg and Don's
Reviewed-by to all and Kuppuswamy's to the last.  This is all on
pci/virtualization for v5.4.

Bjorn

  parent reply	other threads:[~2019-08-19 22:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 19:57 [PATCH] PCI/IOV: Move sysfs SR-IOV functions to iov.c Kelsey Skunberg
2019-08-10  7:17 ` [Linux-kernel-mentees] " Greg KH
2019-08-10 17:15   ` Bjorn Helgaas
2019-08-10 17:24     ` Greg KH
2019-08-10 21:32       ` Kelsey Skunberg
2019-08-13 20:45 ` [PATCH v2 0/3] PCI: pci-sysfs.c cleanup Kelsey Skunberg
2019-08-13 20:45   ` [PATCH v2 1/3] PCI: sysfs: Define device attributes with DEVICE_ATTR*() Kelsey Skunberg
2019-08-14  7:52     ` [Linux-kernel-mentees] " Greg KH
2019-08-14 23:14       ` Kelsey Skunberg
2019-08-15 15:54       ` Kelsey Skunberg
2019-08-13 20:45   ` [PATCH v2 2/3] PCI: sysfs: Change permissions from symbolic to octal Kelsey Skunberg
2019-08-14  5:38     ` [Linux-kernel-mentees] " Bjorn Helgaas
2019-08-14  7:53       ` Greg Kroah-Hartman
2019-08-15 14:37       ` Don Dutile
2019-09-04  6:22         ` Kelsey Skunberg
2019-09-04 15:32           ` Don Dutile
2019-09-04 18:33           ` Don Dutile
2019-09-05  4:04             ` Kelsey Skunberg
2019-08-13 20:45   ` [PATCH v2 3/3] PCI/IOV: Move sysfs SR-IOV functions to iov.c Kelsey Skunberg
2019-08-14  5:40   ` [Linux-kernel-mentees] [PATCH v2 0/3] PCI: pci-sysfs.c cleanup Bjorn Helgaas
2019-08-15 15:33   ` [PATCH v3 0/4] PCI: Clean up pci-sysfs.c Kelsey Skunberg
2019-08-15 16:08     ` Greg KH
2019-08-16  4:22     ` Don Dutile
2019-08-19 22:42     ` Bjorn Helgaas [this message]
2019-08-15 15:33   ` [PATCH v3 1/4] PCI: sysfs: Define device attributes with DEVICE_ATTR* Kelsey Skunberg
2020-03-14 10:51     ` Ruslan Bilovol
2020-03-14 11:20       ` Greg Kroah-Hartman
2020-03-24  6:10         ` Kelsey
2020-03-24  6:24           ` Greg Kroah-Hartman
2020-03-24 23:53             ` Kelsey
2020-03-25  7:17               ` Greg Kroah-Hartman
2020-03-25 15:15                 ` Kelsey
2019-08-15 15:33   ` [PATCH v3 2/4] PCI: sysfs: Change permissions from symbolic to octal Kelsey Skunberg
2019-08-15 15:33   ` [PATCH v3 3/4] PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO() Kelsey Skunberg
2019-08-15 15:33   ` [PATCH v3 4/4] PCI/IOV: Move sysfs SR-IOV functions to iov.c Kelsey Skunberg
2019-08-15 17:34     ` sathyanarayanan kuppuswamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190819224203.GV253360@google.com \
    --to=helgaas@kernel.org \
    --cc=bodong@mellanox.com \
    --cc=ddutile@redhat.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=skunberg.kelsey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).