Re: [tip:x86/headers] x86: fix "__udivdi3"[drivers/scsi/aha1542.ko] undefined

From: Ingo Molnar
Date: Sat Feb 14 2009 - 02:36:33 EST



* H. Peter Anvin <hpa@xxxxxxxxx> wrote:

> James Bottomley wrote:
>> On Fri, 2009-02-13 at 12:14 -0800, H. Peter Anvin wrote:
>>> James Bottomley wrote:
>>>
>>> #define isa_virt_to_bus(x) ((unsigned int)virt_to_phys(x))
>>>
>>> ... if we're going to do that.
>>
>> Actually, it probably wants to become a static inline ... that way the
>> compiler can always verify the promotion and truncation is legal
>> regardless of whether an actual user is compiled or not.
>>
>
> Yes, that's the right thing to do. I'll fix it up and commit a patch.

Yeah, sure - nevertheless i committed the obvious build fix first.

And as i said, the whole pointer magic construct in aha1542 is a borderline
bug, and if anything like that pops up in non-utter-legacy code it should
be cleaned up anyway.

Ingo
--
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/