[Skiboot] [PATCH 16/22] FSP/LEDS: Move checkpoint status variable to led_set_cmd structure

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Mar 4 22:41:54 AEDT 2015


On 02/18/2015 02:13 AM, Stewart Smith wrote:
> Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
>> "fsp_led_data" structure contains ckpt_status variable which keeps
>> current LED state before updating and if LED update fails then we
>> use this to revert the LED state.
>>

.../...

>>  
>> +/* Free SPCN command */
>> +static inline void free_spcn_cmd(struct led_set_cmd *spcn_cmd)
>> +{
>> +	lock(&spcn_cmd_lock);
>> +	free(spcn_cmd);
>> +	unlock(&spcn_cmd_lock);
>> +}
> 
> I'm struggling to work out why this needs a lock (or a separate function
> that just wraps free()). What am I missing?
> 

Stewart,

You are right.. This is redundant (also this function).. Fixed in v2.

-Vasant



More information about the Skiboot mailing list