Re: ioctl definition - has it changed recently?

From: Piotr Hosowicz
Date: Tue Aug 17 2010 - 09:59:20 EST


On 17.08.2010 15:51, Piotr Hosowicz wrote:
On 17.08.2010 15:18, Arnd Bergmann wrote:
On Tuesday 17 August 2010, Piotr Hosowicz wrote:
Just take a look at all the other patches that went into the
kernel to do this for other drivers.

I do not know how to find them. :-(

git log -p -S"unlocked_ioctl"

Thanks a lot.

It seems different. How to change it? Now it works, I built it without
your remarks, exactly how I described on my blog:

http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/

Ok, as I wrote the prototypes differ. What should I do with the inode
parameter?

It's normally not needed.

It seems so because the implementation nowwhere refers to the inode
parameter. But I guess it won't be OK to just remove this parameter from
the declaraion and the implemetation because some other NVidia code may
refer to this parameter, pass it and so on. Potentially scrambling
(spoiling) the parameter stack.

This is as I said, I just commented inode parameter and it wont build:

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: At top level:



/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:426: warning: initialization from incompatible pointer type


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: In function ânv_kern_unlocked_ioctlâ:


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: warning: passing argument 1 of ânv_kern_ioctlâ from incompatible pointer type


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected âstruct file *â but argument is of type âstruct inode *â


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: warning: passing argument 2 of ânv_kern_ioctlâ makes integer from pointer without a cast

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected âunsigned intâ but argument is of type âstruct file *â


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: error: too many arguments to function ânv_kern_ioctlâ


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: In function ânv_kern_compat_ioctlâ:


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: warning: passing argument 1 of ânv_kern_ioctlâ from incompatible pointer type


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected âstruct file *â but argument is of type âstruct inode *â


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: warning: passing argument 2 of ânv_kern_ioctlâ makes integer from pointer without a cast

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected âunsigned intâ but argument is of type âstruct file *â


/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: error: too many arguments to function ânv_kern_ioctlâ

Regards,

Piotr Hosowicz

--
Zatrzymuje siÄ samochÃd na sejmowym parkingu. Podchodzi do niego ochroniarz i mÃwi:
- Pan tu parkuje?! Tu Sejm ... Ministrowie, politycy, posÅowiei ...
- DziÄki, wÅÄczÄ alarm.
NP: -
NB: 2.6.36-rc1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/