* On Tuesday 29 July 2008 15:26:45 Yang, Sheng wrote: > On Tuesday 29 July 2008 17:34:47 Amit Shah wrote:
> > > rename irq_request_opaque to struct* kvm in struct kvm_pic, and > > > modify all irq_request() calling(three of them in all) with (void > > > *)kvm. > > > > 'opaque' fields can be later made to point to other structures > > without changing the structure itself. This is an advantage. Will > > the kvm_pic struct be needed to change in the future? Very > > unlikely. So we can rename it to struct kvm *, however, that gives > > us no real benefit as against opaque (just readability). > > Yes, the readability... > > I think people would be very curious about why > > void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi) > > got a irq_request_opaque as a parameter. It's more like a hack, which > is not my meaning... > > Anyway, it's trivial one and just a coding style. :) However, this idiom is used in quite a few places in the kernel already so it shouldn't come as a big surprise to someone reading the code. Amit -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html