should cpus_in_xmon be volatile?

Dave Hansen haveblue at us.ibm.com
Fri Nov 19 09:52:33 EST 2004


I'm getting a warning (one of many) during a build of 2.6.10-rc2-mm2:

memhotplug/arch/ppc64/xmon/xmon.c: In function `xmon_core':
memhotplug/arch/ppc64/xmon/xmon.c:401: warning: passing arg 1 of
`__cpus_weight' discards qualifiers from pointer target type

It's this chunk of code:
        
        for (timeout = 100000000; timeout != 0; --timeout)
        	if (cpus_weight(cpus_in_xmon) >= ncpus)
                	break;

Is that warning because cpus_in_xmon is volatile and __cpus_weight()
doesn't take a pointer to a volatile type?  

I do notice that none of the test/set_bit() functions have volatile
types, and I have the feeling this is because they take pointers to
being with.  Does the fact that since __cpus_weight() takes a pointer
that cpus_in_xmon doesn't really need to be declared volatile?

-- Dave




More information about the Linuxppc64-dev mailing list