Re: [patch -mm] mm, mempolicy: silence gcc warning

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

 



On Mon, 25 Nov 2013, Andrew Morton wrote:

> > > It worries me that the CONFIG_NUMA=n version of mpol_to_str() doesn't
> > > stick a '\0' into *buffer.  Hopefully it never gets called...
> > 
> > Don't worry. It never happens. Currently, all of caller depend on CONFIG_NUMA.
> > However it would be nice if CONFIG_NUMA=n version of mpol_to_str() is
> > implemented
> > more carefully. I don't know who's mistake.
> 
> Put a BUG() in there?
> 

Why make it a fatal runtime error when it can simply be a compile time 
error since calling mpol_to_str() without CONFIG_NUMA is unnecessary?  
There wouldn't be a mempolicy to convert, the struct has no fields in such 
a configuration.

--
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]