[Qemu-devel] [PATCH 1/6] qht: remove unused map param from qht_remove__locked

Emilio G. Cota posted 6 patches 7 years, 2 months ago
There is a newer version of this series
[Qemu-devel] [PATCH 1/6] qht: remove unused map param from qht_remove__locked
Posted by Emilio G. Cota 7 years, 2 months ago
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 util/qht.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/util/qht.c b/util/qht.c
index c138777a9c..7b57b50a24 100644
--- a/util/qht.c
+++ b/util/qht.c
@@ -665,8 +665,7 @@ static inline void qht_bucket_remove_entry(struct qht_bucket *orig, int pos)
 
 /* call with b->lock held */
 static inline
-bool qht_remove__locked(struct qht_map *map, struct qht_bucket *head,
-                        const void *p, uint32_t hash)
+bool qht_remove__locked(struct qht_bucket *head, const void *p, uint32_t hash)
 {
     struct qht_bucket *b = head;
     int i;
@@ -701,7 +700,7 @@ bool qht_remove(struct qht *ht, const void *p, uint32_t hash)
     qht_debug_assert(p);
 
     b = qht_bucket_lock__no_stale(ht, hash, &map);
-    ret = qht_remove__locked(map, b, p, hash);
+    ret = qht_remove__locked(b, p, hash);
     qht_bucket_debug__locked(b);
     qemu_spin_unlock(&b->lock);
     return ret;
-- 
2.17.1


Re: [Qemu-devel] [PATCH 1/6] qht: remove unused map param from qht_remove__locked
Posted by Alex Bennée 7 years, 1 month ago
Emilio G. Cota <cota@braap.org> writes:

> Signed-off-by: Emilio G. Cota <cota@braap.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  util/qht.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/util/qht.c b/util/qht.c
> index c138777a9c..7b57b50a24 100644
> --- a/util/qht.c
> +++ b/util/qht.c
> @@ -665,8 +665,7 @@ static inline void qht_bucket_remove_entry(struct qht_bucket *orig, int pos)
>
>  /* call with b->lock held */
>  static inline
> -bool qht_remove__locked(struct qht_map *map, struct qht_bucket *head,
> -                        const void *p, uint32_t hash)
> +bool qht_remove__locked(struct qht_bucket *head, const void *p, uint32_t hash)
>  {
>      struct qht_bucket *b = head;
>      int i;
> @@ -701,7 +700,7 @@ bool qht_remove(struct qht *ht, const void *p, uint32_t hash)
>      qht_debug_assert(p);
>
>      b = qht_bucket_lock__no_stale(ht, hash, &map);
> -    ret = qht_remove__locked(map, b, p, hash);
> +    ret = qht_remove__locked(b, p, hash);
>      qht_bucket_debug__locked(b);
>      qemu_spin_unlock(&b->lock);
>      return ret;


--
Alex Bennée