All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Haiyang Zhang <haiyangz@linuxonhyperv.com>
Cc: haiyangz@microsoft.com, davem@davemloft.net,
	netdev@vger.kernel.org, olaf@aepfle.de,
	linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	vkuznets@redhat.com
Subject: Re: [PATCH net-next, v2] hv_netvsc: fix vf serial matching with pci slot info
Date: Fri, 12 Oct 2018 15:20:52 -0700	[thread overview]
Message-ID: <20181012152030.4f58c65e@xeon-e3> (raw)
In-Reply-To: <20181012205515.23355-1-haiyangz@linuxonhyperv.com>

On Fri, 12 Oct 2018 20:55:15 +0000
Haiyang Zhang <haiyangz@linuxonhyperv.com> wrote:

Thanks for fixing this.

  
> +	if (kstrtou32(kobject_name(&pdev->slot->kobj), 10, &serial)) {
> +		netdev_notice(vf_netdev, "Invalid vf serial:%s\n",
> +			      pdev->slot->kobj.name);
> +		return NULL;
> +	}

Shouldn't this use kobject_name() in the message as well.

Looking at the pci.h code there is already an API to get name from
slot (it uses kobject_name()). So please use that one.


WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Haiyang Zhang <haiyangz@linuxonhyperv.com>
Cc: olaf@aepfle.de, netdev@vger.kernel.org, haiyangz@microsoft.com,
	linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	vkuznets@redhat.com, davem@davemloft.net
Subject: Re: [PATCH net-next, v2] hv_netvsc: fix vf serial matching with pci slot info
Date: Fri, 12 Oct 2018 15:20:52 -0700	[thread overview]
Message-ID: <20181012152030.4f58c65e@xeon-e3> (raw)
In-Reply-To: <20181012205515.23355-1-haiyangz@linuxonhyperv.com>

On Fri, 12 Oct 2018 20:55:15 +0000
Haiyang Zhang <haiyangz@linuxonhyperv.com> wrote:

Thanks for fixing this.

  
> +	if (kstrtou32(kobject_name(&pdev->slot->kobj), 10, &serial)) {
> +		netdev_notice(vf_netdev, "Invalid vf serial:%s\n",
> +			      pdev->slot->kobj.name);
> +		return NULL;
> +	}

Shouldn't this use kobject_name() in the message as well.

Looking at the pci.h code there is already an API to get name from
slot (it uses kobject_name()). So please use that one.

  reply	other threads:[~2018-10-12 22:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 20:55 [PATCH net-next,v2] hv_netvsc: fix vf serial matching with pci slot info Haiyang Zhang
2018-10-12 22:20 ` Stephen Hemminger [this message]
2018-10-12 22:20   ` [PATCH net-next, v2] " Stephen Hemminger
2018-10-12 22:27   ` Haiyang Zhang

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=20181012152030.4f58c65e@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@linuxonhyperv.com \
    --cc=haiyangz@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=vkuznets@redhat.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.