All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Weidong Han <weidong.han@intel.com>
Cc: xen-devel@lists.xensource.com, Keir.Fraser@eu.citrix.com,
	jbarnes@virtuousgeek.org
Subject: Re: [PATCH v2] pv-ops: register xen pci notifier
Date: Wed, 29 Jul 2009 10:02:35 -0700	[thread overview]
Message-ID: <4A7080AB.50105@goop.org> (raw)
In-Reply-To: <1248835104-5875-1-git-send-email-weidong.han@intel.com>

On 07/28/09 19:38, Weidong Han wrote:
> Register the notifier to handle hot-plug devices and SR-IOV devices
> for Xen hypervisor. When a device is hot added or removed, it adds
> or removes it to Xen via hypercalls.
>
> Changes in v2:
> Remove inline #ifdef and the awkward dangling else/#endif construction,
> and rather than using memset, use variable declaration and initializer
> to assign the elements in xen_add_device.
>   

That looks much better.  Just one tiny nit:

> +
> +	if (HANDLE_PCI_IOV && pci_dev->is_virtfn) {
> +		struct physdev_manage_pci_ext manage_pci_ext = {
> +			.bus		= pci_dev->bus->number,
> +			.devfn		= pci_dev->devfn,
> +			.is_extfn	= 0,
> +			.is_virtfn 	= 1,
> +			.physfn.bus	= pci_dev->physfn->bus->number,
> +			.physfn.devfn	= pci_dev->physfn->devfn,
> +		};
> +
> +		r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add_ext,
> +			&manage_pci_ext);
> +	} else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) {
> +		struct physdev_manage_pci_ext manage_pci_ext = {
> +			.bus		= pci_dev->bus->number,
> +			.devfn		= pci_dev->devfn,
> +			.is_extfn	= 1,
> +			.is_virtfn 	= 0,
> +			.physfn.bus	= 0,
> +			.physfn.devfn	= 0,
>   

It isn't necessarily to explicitly initialize elements to 0; that will
happen implicitly as a result of using an initializer.

Thanks,
    J

  reply	other threads:[~2009-07-29 17:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29  2:38 [PATCH v2] pv-ops: register xen pci notifier Weidong Han
2009-07-29 17:02 ` Jeremy Fitzhardinge [this message]
2009-07-30  6:05   ` Han, Weidong

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=4A7080AB.50105@goop.org \
    --to=jeremy@goop.org \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=weidong.han@intel.com \
    --cc=xen-devel@lists.xensource.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.