]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: vchiq_core: drop unnecessary release_count
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 15 May 2021 19:10:41 +0000 (21:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 15:56:31 +0000 (17:56 +0200)
There is no benefit of the variable release_count, so drop it.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1621105859-30215-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index 9b6c62653656c8c3ab54ad4c0e6f1910691ba208..85fd0a6d8bdde8c891a265622f5adc42e2734e4d 100644 (file)
@@ -1175,7 +1175,6 @@ static void
 release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info,
             struct vchiq_header *header, struct vchiq_service *service)
 {
-       int release_count;
 
        mutex_lock(&state->recycle_mutex);
 
@@ -1192,10 +1191,9 @@ release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info,
                header->msgid = msgid & ~VCHIQ_MSGID_CLAIMED;
        }
 
-       release_count = slot_info->release_count;
-       slot_info->release_count = ++release_count;
+       slot_info->release_count++;
 
-       if (release_count == slot_info->use_count) {
+       if (slot_info->release_count == slot_info->use_count) {
                int slot_queue_recycle;
                /* Add to the freed queue */