Message ID | 20230130164256.764534-3-simon.horman@corigine.com |
---|---|
State | Changes Requested |
Headers | show |
Series | dpif-netlink: add revalidator for offload of meters | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
References: <20230130164256.764534-3-simon.horman@corigine.com> Bleep bloop. Greetings Simon Horman, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Simon Horman <simon.horman@corigine.com> Lines checked: 60, Warnings: 1, Errors: 0 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
diff --git a/lib/id-pool.c b/lib/id-pool.c index 97b7185ed538..5c6dab906922 100644 --- a/lib/id-pool.c +++ b/lib/id-pool.c @@ -87,14 +87,22 @@ id_pool_find(struct id_pool *pool, uint32_t id) } void -id_pool_add(struct id_pool *pool, uint32_t id) +id_hmap_add(struct hmap *map, uint32_t id) { struct id_node *id_node = xmalloc(sizeof *id_node); size_t hash; id_node->id = id; hash = hash_int(id, 0); - hmap_insert(&pool->map, &id_node->node, hash); + hmap_insert(map, &id_node->node, hash); +} + +void +id_pool_add(struct id_pool *pool, uint32_t id) +{ + struct hmap *map = &pool->map; + + id_hmap_add(map, id); } bool diff --git a/lib/id-pool.h b/lib/id-pool.h index f71cc570f104..9fcd2c188666 100644 --- a/lib/id-pool.h +++ b/lib/id-pool.h @@ -35,6 +35,7 @@ struct id_pool *id_pool_create(uint32_t base, uint32_t n_ids); void id_pool_destroy(struct id_pool *); bool id_pool_alloc_id(struct id_pool *, uint32_t *id); void id_pool_free_id(struct id_pool *, uint32_t id); +void id_hmap_add(struct hmap *map, uint32_t id); void id_pool_add(struct id_pool *, uint32_t id); /*