staging: vchiq_core: Get the rid off curly braces around cases
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 11 Apr 2021 18:11:33 +0000 (20:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Apr 2021 09:41:21 +0000 (11:41 +0200)
Additional curly braces around cases are a bit harder to read. So
change the scope of service quota to get the rid off those braces.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-4-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 5428140..835f2a5 100644 (file)
@@ -3357,6 +3357,7 @@ vchiq_set_service_option(unsigned int handle,
 {
        struct vchiq_service *service = find_service_by_handle(handle);
        enum vchiq_status status = VCHIQ_ERROR;
+       struct vchiq_service_quota *quota;
 
        if (service) {
                switch (option) {
@@ -3365,9 +3366,8 @@ vchiq_set_service_option(unsigned int handle,
                        status = VCHIQ_SUCCESS;
                        break;
 
-               case VCHIQ_SERVICE_OPTION_SLOT_QUOTA: {
-                       struct vchiq_service_quota *quota =
-                               &service->state->service_quotas[
+               case VCHIQ_SERVICE_OPTION_SLOT_QUOTA:
+                       quota = &service->state->service_quotas[
                                        service->localport];
                        if (value == 0)
                                value = service->state->default_slot_quota;
@@ -3385,11 +3385,10 @@ vchiq_set_service_option(unsigned int handle,
                                }
                                status = VCHIQ_SUCCESS;
                        }
-               } break;
+                       break;
 
-               case VCHIQ_SERVICE_OPTION_MESSAGE_QUOTA: {
-                       struct vchiq_service_quota *quota =
-                               &service->state->service_quotas[
+               case VCHIQ_SERVICE_OPTION_MESSAGE_QUOTA:
+                       quota = &service->state->service_quotas[
                                        service->localport];
                        if (value == 0)
                                value = service->state->default_message_quota;
@@ -3407,7 +3406,7 @@ vchiq_set_service_option(unsigned int handle,
                                        complete(&quota->quota_event);
                                status = VCHIQ_SUCCESS;
                        }
-               } break;
+                       break;
 
                case VCHIQ_SERVICE_OPTION_SYNCHRONOUS:
                        if ((service->srvstate == VCHIQ_SRVSTATE_HIDDEN) ||