All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Cc: Android Kernel" <kernel-team@android.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] driver core: Change delimiter in devlink device's name to "--"
Date: Mon, 27 Jul 2020 16:21:05 +0200	[thread overview]
Message-ID: <CAJZ5v0izVrJeQNroeNS8xu66c8LskHSiCJRQvVvrhWSZV8tL_g@mail.gmail.com> (raw)
In-Reply-To: <20200724180523.1393383-1-saravanak@google.com>

On Fri, Jul 24, 2020 at 8:05 PM Saravana Kannan <saravanak@google.com> wrote:
>
> The devlink device name is of the form "supplier:consumer". But ":" is
> fairly common in device names and makes it visually hard to distinguish
> supplier and consumer. So, replace it with "--" to make it easier.
>
> Signed-off-by: Saravana Kannan <saravanak@google.com>

Well, this makes sense in principle, but I wonder how much risk of
breaking anything in user space there is?

> ---
>  Documentation/ABI/testing/sysfs-class-devlink | 2 +-
>  drivers/base/core.c                           | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-class-devlink b/Documentation/ABI/testing/sysfs-class-devlink
> index 3a24973abb83..64791b65c9a3 100644
> --- a/Documentation/ABI/testing/sysfs-class-devlink
> +++ b/Documentation/ABI/testing/sysfs-class-devlink
> @@ -4,7 +4,7 @@ Contact:        Saravana Kannan <saravanak@google.com>
>  Description:
>                 Provide a place in sysfs for the device link objects in the
>                 kernel at any given time.  The name of a device link directory,
> -               denoted as ... above, is of the form <supplier>:<consumer>
> +               denoted as ... above, is of the form <supplier>--<consumer>
>                 where <supplier> is the supplier device name and <consumer> is
>                 the consumer device name.
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index b6e8b0bb76e4..4d05868d9356 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -623,7 +623,7 @@ struct device_link *device_link_add(struct device *consumer,
>
>         link->link_dev.class = &devlink_class;
>         device_set_pm_not_required(&link->link_dev);
> -       dev_set_name(&link->link_dev, "%s:%s",
> +       dev_set_name(&link->link_dev, "%s--%s",
>                      dev_name(supplier), dev_name(consumer));
>         if (device_register(&link->link_dev)) {
>                 put_device(consumer);
> --
> 2.28.0.rc0.142.g3c755180ce-goog
>

  reply	other threads:[~2020-07-27 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 18:05 [PATCH v1] driver core: Change delimiter in devlink device's name to "--" Saravana Kannan
2020-07-27 14:21 ` Rafael J. Wysocki [this message]
2020-07-27 22:09   ` Saravana Kannan

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=CAJZ5v0izVrJeQNroeNS8xu66c8LskHSiCJRQvVvrhWSZV8tL_g@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saravanak@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.