Re: [PATCH] mm: don't access vm_flags as 'int'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 26, 2011 at 11:44 AM, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
>
> Woo-hoo!
>
> Why it is marked __nocast and not __bitwise__ like gfp_t?

Because that's what one of the other patches in Andrew's series had,
so I just emulated that.

Also, I don't think we can currently mark it __bitwise without causing
a sh*tload of sparse warnings. __nocast is much weaker than bitwise
(it only warns about implicit casts to different sizes). __bitwise
implies a lot more type-checking, and actually makes the result a very
specific type.

I'm not sure it is worth the __bitwise pain. If we go down the
__bitwise path, we'd need to mark all the VM_XYZZY constants with the
type, and we'd need to do *all* the conversions in one go. I am
definitely not ready to do that at this stage, but I was willing to
take the much weaker __nocast.

                    Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]