Commit 63e24ae2 authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman

staging: vchiq_core: drop unnecessary release_count

There is no benefit of the variable release_count, so drop it.
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1621105859-30215-3-git-send-email-stefan.wahren@i2se.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c82975b
...@@ -1175,7 +1175,6 @@ static void ...@@ -1175,7 +1175,6 @@ static void
release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info, release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info,
struct vchiq_header *header, struct vchiq_service *service) struct vchiq_header *header, struct vchiq_service *service)
{ {
int release_count;
mutex_lock(&state->recycle_mutex); mutex_lock(&state->recycle_mutex);
...@@ -1192,10 +1191,9 @@ release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info, ...@@ -1192,10 +1191,9 @@ release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info,
header->msgid = msgid & ~VCHIQ_MSGID_CLAIMED; header->msgid = msgid & ~VCHIQ_MSGID_CLAIMED;
} }
release_count = slot_info->release_count; slot_info->release_count++;
slot_info->release_count = ++release_count;
if (release_count == slot_info->use_count) { if (slot_info->release_count == slot_info->use_count) {
int slot_queue_recycle; int slot_queue_recycle;
/* Add to the freed queue */ /* Add to the freed queue */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment