Re: [patch] Re: Zillions of warnings in -next

From: Stefan Richter
Date: Tue Oct 27 2009 - 20:09:04 EST


Joe Perches wrote:
> On Tue, 2009-10-27 at 15:36 -0700, Randy Dunlap wrote:
[...]
>> @@ -643,7 +644,7 @@ eventq_wakeup(struct ioq_notifier *notif
>> struct ioq_ring_desc *desc = iter.desc;
>> struct vbus_pci_event *event;
>>
>> - event = (struct vbus_pci_event *)desc->cookie;
>> + event = (struct vbus_pci_event *)(unsigned long)desc->cookie;
>>
>> switch (event->eventid) {
>> case VBUS_PCI_EVENT_DEVADD:
>
> #define cast_cookie(type, cookie) ((type)(unsigned long)(cookie))
> #define assign_cookie(var, cookie) (var) = ((typeof(var))(unsigned
> long)(cookie))

C is usually preferred over cpp. :-)
--
Stefan Richter
-=====-==--= =-=- ===--
http://arcgraph.de/sr/
--
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/