On 12.12.2023 13:57, Julien Grall wrote:
> On 12/12/2023 09:47, Juergen Gross wrote:
>> @@ -109,12 +109,16 @@ struct lock_profile_qhead {
>>       spinlock_t l = _SPIN_LOCK_UNLOCKED(NULL);                              
>>    \
>>       static struct lock_profile __lock_profile_data_##l = _LOCK_PROFILE(l); 
>>    \
>>       _LOCK_PROFILE_PTR(l)
>> +#define DEFINE_RSPINLOCK(l)                                                 
>>   \
>> +    rspinlock_t l = _SPIN_LOCK_UNLOCKED(NULL);                              
>>   \
>> +    static struct lock_profile __lock_profile_data_##l = _LOCK_PROFILE(l);  
>>   \
>> +    _LOCK_PROFILE_PTR(l)
>>   
>> -#define spin_lock_init_prof(s, l)                                           
>>   \
>> +#define __spin_lock_init_prof(s, l, locktype)                               
>>   \
> 
> If I am not mistaken the double-underscore prefix is a violation in 
> MISRA. So can this be renamed to:
> 
> spin_lock_init_prof__()?

Is the new parameter needed at all? Can't we use typeof((s)->l) in place of
passing the type explicitly?

Jan

Reply via email to