lkml.org 
[lkml]   [2011]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/3] PCI: Track the size of each saved capability data area
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


\
 
 \ /
  Last update: 2011-05-09 22:47    [W:0.272 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site