Marc Kleine-Budde wrote:
> Kurt Van Dijck wrote:
>> On Tue, Feb 09, 2010 at 10:28:27AM +0100, Marc Kleine-Budde wrote:
>>> Kurt Van Dijck wrote:
>>>> Hello,
>>>>
>>>> While compiling my socketcan tree, I came on this issue.
>>>> It only issues a warning, on 64bit targets.
>>>>
>>>> Signed-off-by: Kurt Van Dijck <[email protected]>
>>>> ---
>>>> Index: drivers/net/can/esd_pci331.c
>>>> ===================================================================
>>>> --- drivers/net/can/esd_pci331.c        (revision 1123)
>>>> +++ drivers/net/can/esd_pci331.c        (working copy)
>>>> @@ -859,7 +859,7 @@
>>>>         for (i = 0; i < board->net_count; ++i) {
>>>>                 board->dev[i] = esd331_pci_add_chan(pdev, board, i);
>>>>                 if (IS_ERR(board->dev[i])) {
>>>> -                       err = (int)board->dev[i];
>>>> +                       err = (long)board->dev[i];
>>> Maybe PTR_ERR is even better here?
>> Yep, but I wasn't sure if that would work on older kernels. I wouldn't
>> want to break things :-)
> 
> according to lxr it's in 2.6.16
> 
> http://lxr.linux.no/#linux+v2.6.16/include/linux/err.h#L23
> 
> which should be IMHO an old enough kernel.
> 

Btw. for older Kernels, PTR_ERR can be added to

   trunk/kernel/2.6/include/socketcan/can/dev.h

with some KERNEL_VERSION stuff around it.

Regards,
Oliver

_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to