Convert all to the caller hold lock version
cover Convert all to the caller hold lock version
After commit 50e244cc793d511b86adea24972f3a7264cae114
(fb: rework locking to fix lock ordering on takeover)
and
commit e93a9a868792ad71cdd09d75e5a02d8067473c4e (fb: Yet another band-aid for fixing lockdep mess)
We have two version functions implement almost the same function, except the caller/callee hold lock.
fbcon_takeover vs do_fbcon_takeoverregister_con_driver vs do_register_con_drivertake_over_console vs do_take_over_consoleunbind_con_driver vs do_unbind_con_driverbind_con_driver vs do_bind_con_driverunregister_con_driver vs do_unregister_con_driver
This issue bring us much code duplication,
like do_fbcon_takeover and fbcon_takeover,
they have almost the same.
Although some of them had been re-written
as a wrapper for another, but the wrapper
is so trivial, we can just throw them away.
Also those two versions of almost the same
functions will confuse API's user.
After all, I think this issue is not good
for long time maintain.
This series patch convert all to the
new version which caller hold the lock,
and then delete the old version away.
Thanks
Quoted 27 lines · Wang YanQing
After commit
50e244cc793d511b86adea24972f3a7264cae114
(fb: rework locking to fix lock ordering on takeover)
and
commite93a9a868792ad71cdd09d75e5a02d8067473c4e(fb: Yet another band-aid for fixing lockdep mess)We have two version functions implement almost the same function, except the caller/callee hold lock.
fbcon_takeovervsdo_fbcon_takeoverregister_con_drivervsdo_register_con_drivertake_over_consolevsdo_take_over_consoleunbind_con_drivervsdo_unbind_con_driverbind_con_drivervsdo_bind_con_driverunregister_con_drivervsdo_unregister_con_driverThis issue bring us much code duplication,
likedo_fbcon_takeoverandfbcon_takeover,
they have almost the same.Although some of them had been re-written
as a wrapper for another, but the wrapper
is so trivial, we can just throw them away.Also those two versions of almost the same
functions will confuse API's user.
Quoted 6 lines
After all, I think this issue is not good
for long time maintain.This series patch convert all to the
new version which caller hold the lock,
and then delete the old version away.
Can you also send a patch fixing up the documentation to use the new functions as well?
thanks,
greg k-h
Quoted 3 lines · Greg KH
Can you also send a patch fixing up the documentation to use the new functions as well?
Yes, I will do it.
Thanks.