From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, kvm@vger.kernel.org, avi@redhat.com,
linux-kernel@vger.kernel.org, jan.kiszka@siemens.com
Subject: Re: [PATCH v3 1/3] PCI: Track the size of each saved capability data area
Date: Mon, 9 May 2011 13:43:56 -0700 [thread overview]
Message-ID: <20110509134356.63f66a29@jbarnes-desktop> (raw)
In-Reply-To: <20110420203133.3189.22786.stgit@s20.home>
On Wed, 20 Apr 2011 14:31:33 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:
> -struct pci_cap_saved_state {
> - struct hlist_node next;
> +struct pci_cap_saved {
> char cap_nr;
> + unsigned int size;
> u32 data[0];
> };
>
> +struct pci_cap_saved_state {
> + struct hlist_node next;
> + struct pci_cap_saved saved;
> +};
> +
> struct pcie_link_state;
> struct pci_vpd;
> struct pci_sriov;
> @@ -366,7 +371,7 @@ static inline struct pci_cap_saved_state *pci_find_saved_cap(
> struct hlist_node *pos;
>
> hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
> - if (tmp->cap_nr == cap)
> + if (tmp->saved.cap_nr == cap)
> return tmp;
> }
> return NULL;
Looks pretty good in general. But I think the naming makes it harder
to read than it ought to be.
So we have a pci_cap_saved_state, which implies capability info, and
that's fine.
But pci_cap_saved doesn't communicate much; maybe pci_cap_data or
pci_cap_saved_data would be better?
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2011-05-09 20:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 20:31 [PATCH v3 0/3] Store and load PCI device saved state across function resets Alex Williamson
2011-04-20 20:31 ` [PATCH v3 1/3] PCI: Track the size of each saved capability data area Alex Williamson
2011-05-09 20:43 ` Jesse Barnes [this message]
2011-04-20 20:31 ` [PATCH v3 2/3] PCI: Add interfaces to store and load the device saved state Alex Williamson
2011-04-20 20:31 ` [PATCH v3 3/3] KVM: Use pci_store/load_saved_state() around VM device usage Alex Williamson
2011-04-21 8:32 ` Avi Kivity
2011-04-21 8:32 ` [PATCH v3 0/3] Store and load PCI device saved state across function resets Avi Kivity
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=20110509134356.63f66a29@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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).