Just wondering (maybe I am way off ...). In kernel code I often see segments like lock(thing) do stuff unlock(thing) but in drivers/net/wireless/realtek/rtw88/main.c there is:
void rtw_core_stop(struct rtw_dev *rtwdev) { ... mutex_unlock(&rtwdev->mutex); ... mutex_lock(&rtwdev->mutex); ... }
and that seems back-to-front. Is that as should be?
Just wondering (maybe I am way off ...). net/wireless/ realtek/ rtw88/main. c there is:
In kernel code I often see segments like
lock(thing)
do stuff
unlock(thing)
but in drivers/
void rtw_core_ stop(struct rtw_dev *rtwdev) unlock( &rtwdev- >mutex) ; lock(&rtwdev- >mutex) ;
{
...
mutex_
...
mutex_
...
}
and that seems back-to-front. Is that as should be?