Re: [PATCH] mm/slub.c: use 'unsigned long' instead of 'int' for variable 'slub_debug'

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

 



On Thu, 18 Jul 2013, Chen Gang wrote:

> On 07/17/2013 10:46 PM, Christoph Lameter wrote:
> > On Tue, 16 Jul 2013, Chen Gang wrote:
> >
> >> If we really use 32-bit as unsigned number, better to use 'U' instead of
> >> 'UL' (e.g. 0x80000000U instead of 0x80000000UL).
> >>
> >> Since it is unsigned 32-bit number, it is better to use 'unsigned int'
> >> instead of 'int', which can avoid related warnings if "EXTRA_CFLAGS=-W".
> >
> > Ok could you go through the kernel source and change that?
> >
>
> Yeah, thanks, I should do it.
>
> Hmm... for each case of this issue, it need communicate with (review by)
> various related maintainers.
>
> So, I think one patch for one variable (and related macro contents) is
> enough.
>
> Is it OK ?

The fundamental issue is that typically ints are used for flags and I
would like to keep it that way. Changing the constants in slab.h and the
allocator code to be unsigned int instead of unsigned long wont be that
much of a deal.

Will the code then be clean enough for you?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
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]