linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Convert all to the caller hold lock version
@ 2013-05-08 18:13 Wang YanQing
  2013-05-20 19:27 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Wang YanQing @ 2013-05-08 18:13 UTC (permalink / raw)
  To: gregkh; +Cc: jslaby, alan, airlied, linux-kernel

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_takeover
register_con_driver vs do_register_con_driver
take_over_console vs do_take_over_console
unbind_con_driver vs do_unbind_con_driver
bind_con_driver vs do_bind_con_driver
unregister_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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/9] Convert all to the caller hold lock version
  2013-05-08 18:13 [PATCH 0/9] Convert all to the caller hold lock version Wang YanQing
@ 2013-05-20 19:27 ` Greg KH
  2013-05-21  0:48   ` Wang YanQing
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2013-05-20 19:27 UTC (permalink / raw)
  To: Wang YanQing, jslaby, alan, airlied, linux-kernel

On Thu, May 09, 2013 at 02:13:04AM +0800, Wang YanQing wrote:
> 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_takeover
> register_con_driver vs do_register_con_driver
> take_over_console vs do_take_over_console
> unbind_con_driver vs do_unbind_con_driver
> bind_con_driver vs do_bind_con_driver
> unregister_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.

Can you also send a patch fixing up the documentation to use the new
functions as well?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/9] Convert all to the caller hold lock version
  2013-05-20 19:27 ` Greg KH
@ 2013-05-21  0:48   ` Wang YanQing
  0 siblings, 0 replies; 3+ messages in thread
From: Wang YanQing @ 2013-05-21  0:48 UTC (permalink / raw)
  To: Greg KH; +Cc: jslaby, alan, airlied, linux-kernel

On Mon, May 20, 2013 at 12:27:37PM -0700, Greg KH wrote:
> Can you also send a patch fixing up the documentation to use the new
> functions as well?
> 
Yes, I will do it.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-21  0:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 18:13 [PATCH 0/9] Convert all to the caller hold lock version Wang YanQing
2013-05-20 19:27 ` Greg KH
2013-05-21  0:48   ` Wang YanQing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).