Re: [PATCH v2 1/8] kvm tools: Add optional parameter used in ioport callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 26, 2011 at 12:38 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
>> One option here is to rename 'struct ioport_entry' to 'struct ioport'
>> and pass a pointer to that as the first argument to all of the ops.
>> That's what most APIs in the kernel do anyway.
>
> Why do it like that? this way users of the callback functions will need
> to know the internal structure of struct ioport_entry.

Look at 'struct inode' or similar data structure in the kernel. That's
how we do it. You can then also do s/params/priv/.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux