| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [Xen-devel] [PATCH] xen: notifier: refine 'notifier_head', use 'list_head' directly
 
To: Julien Grall <julien.grall@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>From: chenbaodong <chenbaodong@xxxxxxxxxx>Date: Mon, 3 Jun 2019 09:25:18 +0800Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>Delivery-date: Mon, 03 Jun 2019 01:25:49 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
On 5/31/19 18:22, Julien Grall wrote:
 
Hi,
Missing commit message here.
 
Yes, will be added.
 
On 5/31/19 3:35 AM, Baodong Chen wrote:
 
Signed-off-by: Baodong Chen <chenbaodong@xxxxxxxxxx>
---
  xen/common/notifier.c      | 25 ++++++-------------------
  xen/include/xen/notifier.h | 21 +++++++++++++++------
  2 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/xen/common/notifier.c b/xen/common/notifier.c
index 34488a8..f959a79 100644
--- a/xen/common/notifier.c
+++ b/xen/common/notifier.c
@@ -21,10 +21,10 @@
  void __init notifier_chain_register(
      struct notifier_head *nh, struct notifier_block *n)
  {
-    struct list_head *chain = &nh->head.chain;
+    struct list_head *chain = &nh->head;
      struct notifier_block *nb;
  -    while ( chain->next != &nh->head.chain )
+    while ( chain->next != &nh->head )
      {
          nb = list_entry(chain->next, struct notifier_block, chain);
          if ( n->priority > nb->priority )
@@ -35,19 +35,6 @@ void __init notifier_chain_register(
      list_add(&n->chain, chain);
  }
  -/**
- * notifier_chain_unregister - Remove notifier from a raw notifier 
chain
- * @nh: Pointer to head of the raw notifier chain
- * @n: Entry to remove from notifier chain
- *
- * Removes a notifier from a raw notifier chain.
- * All locking must be provided by the caller.
- */
-void __init notifier_chain_unregister(
-    struct notifier_head *nh, struct notifier_block *n)
-{
-    list_del(&n->chain);
-}
 
Why did you move the function?
 
My fault, should NOT touch this at all.
Patch will be resent.
 
Cheers,
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel 
 |