xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 03/11] vpci: add tear down functions
Date: Wed, 26 Sep 2018 04:50:59 -0600	[thread overview]
Message-ID: <5BAB649302000078001EC1CA@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20180717094830.54806-4-roger.pau@citrix.com>

>>> On 17.07.18 at 11:48, <roger.pau@citrix.com> wrote:
> --- a/xen/drivers/vpci/vpci.c
> +++ b/xen/drivers/vpci/vpci.c
> @@ -31,14 +31,26 @@ struct vpci_register {
>  };
>  
>  #ifdef __XEN__
> -extern vpci_register_init_t *const __start_vpci_array[];
> -extern vpci_register_init_t *const __end_vpci_array[];
> +extern const struct vpci_handler __start_vpci_array[];
> +extern const struct vpci_handler __end_vpci_array[];
>  #define NUM_VPCI_INIT (__end_vpci_array - __start_vpci_array)
>  
>  static void vpci_remove_device_locked(struct pci_dev *pdev)
>  {
> +    unsigned int i;
> +
>      ASSERT(spin_is_locked(&pdev->vpci_lock));
>  
> +    for ( i = 0; i < NUM_VPCI_INIT; i++ )
> +    {
> +        vpci_teardown_t *teardown =
> +            __start_vpci_array[NUM_VPCI_INIT - i - 1].teardown;

Perhaps slightly easier to read if you made the loop count downwards?

>  #define VPCI_PRIORITY_HIGH      "1"
>  #define VPCI_PRIORITY_MIDDLE    "5"
>  #define VPCI_PRIORITY_LOW       "9"
>  
> -#define REGISTER_VPCI_INIT(x, p)                \
> -  static vpci_register_init_t *const x##_entry  \
> -               __used_section(".data.vpci." p) = x
> +#define REGISTER_VPCI_INIT(i, t, p)                                     \
> +  const static struct vpci_handler i ## t ## _entry                     \

Please flip static and const. Iirc we had a case in the past where some
tool (perhaps not a compiler but an analysis tool) choked about this
uncommon ordering.

With these taken care of
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-09-26 10:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  9:48 [PATCH v2 00/11] vpci: add support for SR-IOV capability Roger Pau Monne
2018-07-17  9:48 ` [PATCH v2 01/11] vpci: move lock Roger Pau Monne
2018-09-06  9:57   ` Wei Liu
2018-09-26 10:37   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 02/11] vpci/msix: add lock to protect the list of MSIX regions Roger Pau Monne
2018-09-26 10:42   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 03/11] vpci: add tear down functions Roger Pau Monne
2018-09-06  9:57   ` Wei Liu
2018-09-26 10:50   ` Jan Beulich [this message]
2018-07-17  9:48 ` [PATCH v2 04/11] vpci/msix: add teardown cleanup Roger Pau Monne
2018-09-06 10:14   ` Wei Liu
2018-09-26 15:32   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 05/11] vpci/msi: " Roger Pau Monne
2018-09-06 10:14   ` Wei Liu
2018-09-26 15:34   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 06/11] vpci/header: " Roger Pau Monne
2018-09-28 15:29   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 07/11] rangeset: introduce rangeset_merge Roger Pau Monne
2018-07-17  9:48 ` [PATCH v2 08/11] vpci/header: allow multiple map operations Roger Pau Monne
2018-09-28 15:38   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 09/11] pci: add vpci hooks for device addition/removal Roger Pau Monne
2018-09-28 15:48   ` Jan Beulich
2018-07-17  9:48 ` [PATCH v2 10/11] vpci: add a wait operation to the vpci vcpu pending actions Roger Pau Monne
2018-07-17  9:48 ` [PATCH v2 11/11] vpci/sriov: add support for SR-IOV capability Roger Pau Monne
2018-09-06 10:37   ` Wei Liu
2018-09-07  9:16     ` Roger Pau Monné
2018-10-04 14:50   ` Jan Beulich

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=5BAB649302000078001EC1CA@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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).