[PATCH] savage: More (intermediate) casts to silence warnings

Tormod Volden lists.tormod at gmail.com
Sun Feb 13 12:40:50 PST 2011


On Sat, Feb 12, 2011 at 10:43 PM, Mark Kettenis wrote:
> This isn't really the right way to fix things.  At least the casts
> should use uintptr_t instead of int.  That way you won't truncate
> addresses on true 64-bit architectures.  Or just leave these warnings
> there as a reminder of the misdesigned DGA and DRI APIs.  They really
> should not try to store a "physical" address into a C pointer.

Thanks for the review and explanation. I will change them to
uintptr_t, and look out for similar cases. In practice, we probably
won't see many Savage cards on 64-bit architectures :) For anyone
wondering, the psav->FbRegion.base is a pci_addr_t (uint64_t) from
pciaccess.h.

Tormod


More information about the xorg-devel mailing list