Hi,
On 2015/07/15 23:27, Christos Zoulas wrote:
> In article <[email protected]>,
> Kengo NAKAHARA <[email protected]> wrote:
>
>> Thus, here is the implementation of above specification (include man)
>> http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api.patch
>> furthermore, here is if_wm usage example by [email protected]
>
> This has a problem; in the man and code page, you declare pci_intr_alloc as:
>
> +.Ft int
> +.Fn pci_intr_alloc "struct pci_attach_args *pa" \
> +"pci_intr_handle_t **ihp" "pci_intr_type_t *counts" \
> +"pci_intr_type_t max_type"
>
> And then in the examples you are passing it "int counts[x];":
>
> + int counts[PCI_INTR_TYPE_SIZE];
> + counts[PCI_INTR_TYPE_MSIX] = 5;
> + counts[PCI_INTR_TYPE_MSI] = 1;
> + counts[PCI_INTR_TYPE_INTX] = 1;
> + error = pci_intr_alloc(pa, ihps, counts,
>
> I think you want int *counts in the declaration; this also avoids the problem
> of the enum being possibly unsigned (depending on the implementation).
Thank you for your comment. I fix pci_intr_alloc() uses int *counts.
I also fix missing about man installation and some wording. Here is
new patch,
http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api2.patch
>> http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api-wm-example.patch
>
> I like the patch. There is a typo "interrput".
I fix typo and update counts of pci_intr_alloc() to use int * type.
Here is new patch,
http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api-wm-example2.patch
>> Could you comment this patch?
>
> I like it! Thanks for working on this...
Could you comment? If there is no issue, I'm going to commit these
patches after a few days or weeks.
Thanks,
--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.
Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit
Kengo NAKAHARA <[email protected]>