[Skiboot] [PATCH 03/25] sparse: declare proc_chip_quirks as extern

Cedric Le Goater clg at fr.ibm.com
Wed Apr 29 16:38:36 AEST 2015


Hello Stewart,

On 04/22/2015 05:41 AM, Stewart Smith wrote:
> Cédric Le Goater <clg at fr.ibm.com> writes:
>> Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
>> ---
>>  include/chip.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/chip.h b/include/chip.h
>> index ae0902f7a06c..c3eb9d6666e3 100644
>> --- a/include/chip.h
>> +++ b/include/chip.h
>> @@ -90,7 +90,7 @@ enum proc_chip_type {
>>  };
>>
>>  /* Simulator quirks */
>> -enum proc_chip_quirks {
>> +extern enum proc_chip_quirks {
>>  	QUIRK_NO_CHIPTOD	= 0x00000001,
>>  	QUIRK_MAMBO_CALLOUTS	= 0x00000002,
>>  	QUIRK_NO_F000F		= 0x00000004,
> 
> (going through some old patches)
> 
> Why should this be extern?

May be this is not the right fix. 


Here is the symptom :

	include/chip.h:101:3: warning: symbol 'proc_chip_quirks' was not declared. Should it be static?

This is because 'core/chip.c' defines :

	enum proc_chip_quirks proc_chip_quirks;

which is later used with :
 
	static inline bool chip_quirk(unsigned int q)
	{
		return !!(proc_chip_quirks & q);
	}


So, we could also make chip_quirk() a real symbol and not an inline.

Cheers,

C.



More information about the Skiboot mailing list