lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectQuestion about context imbalance warning in sparse
Hi Luc,


Sparse does not seem to consider the first parameter
of __context__().

Sparse does not warn anything about this code.


void foo(void)
{
__context__(a, 1);
__context__(b, -1);
}




In Linux, I think sparse should warn
the following code
(lock and unlock different locks)


void foo(void)
{
write_lock(&my_lock1);
write_unlock(&my_lock2);
}



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2024-05-27 16:28    [W:0.023 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site