From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1 of 2] libxl: Move bdf parsing into libxlu
Date: Mon, 2 Apr 2012 15:45:40 +0100 [thread overview]
Message-ID: <4F79BB94.50003@eu.citrix.com> (raw)
In-Reply-To: <1333364737.25602.47.camel@zakaz.uk.xensource.com>
On 02/04/12 12:05, Ian Campbell wrote:
> On Mon, 2012-04-02 at 11:47 +0100, George Dunlap wrote:
>> # HG changeset patch
>> # User George Dunlap<george.dunlap@eu.citrix.com>
>> # Date 1333362574 -3600
>> # Node ID 5386937e6c5c9afaa8a3cd56d391dcc9e40d0596
>> # Parent f744e82ea74075983de6d5b0ad0cf7ccacf999a2
>> libxl: Move bdf parsing into libxlu
>>
>> Config parsing functions do not properly belong in libxl. Move them into
>> libxlu so that others can use them or not as they see fit.
>>
>> No functional changes. One side-effect was making public a private libxl
>> utility function which just set the elements of a structure from the function
>> arguments passed in.
>> [...]
>> diff -r f744e82ea740 -r 5386937e6c5c tools/libxl/libxl.h
>> --- a/tools/libxl/libxl.h Wed Feb 29 16:30:34 2012 +0000
>> +++ b/tools/libxl/libxl.h Mon Apr 02 11:29:34 2012 +0100
>> @@ -573,13 +573,10 @@ int libxl_device_pci_add(libxl_ctx *ctx,
>> int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
>> int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
>> libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid, int *num);
>> -
>> -/*
>> - * Parse a PCI BDF into a PCI device structure.
>> - */
>> -int libxl_device_pci_parse_bdf(libxl_ctx *ctx,
>> - libxl_device_pci *pcidev,
>> - const char *str);
>> +/* Just initialize the structure elements with the arguments provided. */
>> +int libxl_pci_dev_init(libxl_device_pci *pcidev, unsigned int domain,
>> + unsigned int bus, unsigned int dev,
>> + unsigned int func, unsigned int vdevfn);
> libxl_<type>_init has a particular meaning described further up in this
> header. Although you haven't actually used<type> here so it doesn't
> conflict the general convention is to use the type name as a prefix.
>
> Does this function actually add all that much value? The users of it
> could either open code it or have a local version.
You know, I think I'll just make two local copies of the function. I'll
also give it a less misleading name.
-George
next prev parent reply other threads:[~2012-04-02 14:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 10:47 [PATCH 0 of 2] [v2] Add per-device and global permissive config options for pci passthrough George Dunlap
2012-04-02 10:47 ` [PATCH 1 of 2] libxl: Move bdf parsing into libxlu George Dunlap
2012-04-02 11:05 ` Ian Campbell
2012-04-02 14:45 ` George Dunlap [this message]
2012-04-02 10:47 ` [PATCH 2 of 2] xl, libxl: Add per-device and global permissive config options for pci passthrough George Dunlap
2012-04-02 11:30 ` Ian Campbell
2012-04-02 15:22 ` George Dunlap
2012-04-02 15:29 ` Ian Campbell
2012-04-02 15:20 ` Ian Jackson
2012-04-02 15:43 ` George Dunlap
2012-04-02 15:51 ` Ian Jackson
2012-04-02 16:40 ` George Dunlap
2012-04-02 16:42 ` Ian Jackson
2012-04-02 16:56 ` George Dunlap
-- strict thread matches above, loose matches on Subject: below --
2012-04-03 13:54 [PATCH 0 of 2] [v2] " George Dunlap
2012-04-03 13:54 ` [PATCH 1 of 2] libxl: Move bdf parsing into libxlu George Dunlap
2012-04-03 14:34 ` Ian Jackson
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=4F79BB94.50003@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.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.