lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] Makes lguest's irq handler typesafe
Rusty Russell wrote:
> Just a trivial example.
> ---
> drivers/lguest/lguest_device.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff -r 00ab7672f658 drivers/lguest/lguest_device.c
> --- a/drivers/lguest/lguest_device.c Thu Jan 17 16:54:00 2008 +1100
> +++ b/drivers/lguest/lguest_device.c Thu Jan 17 16:59:46 2008 +1100
> @@ -179,9 +179,8 @@ static void lg_notify(struct virtqueue *
> hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0);
> }
>
> -static irqreturn_t lguest_interrupt(int irq, void *_vq)
> +static irqreturn_t lguest_interrupt(int irq, struct virtqueue *vq)
> {
> - struct virtqueue *vq = _vq;
> struct lguest_device_desc *desc = to_lgdev(vq->vdev)->desc;

Ugh.

This will be a compatibility nightmare. I don't see how void* is so
evil for this, or timers.

It's not like there's a huge cost associated with a pointer alias.

Jeff





\
 
 \ /
  Last update: 2008-01-18 21:49    [W:0.053 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site