staging: vchiq_arm: Avoid unnecessary line breaks
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 15 May 2021 19:10:56 +0000 (21:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 15:56:32 +0000 (17:56 +0200)
There are a few statements which are unnecessary broken into multiple lines.
Let's join them into a single line to improve readability.

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

index d351b467e30a175b420a19e3c7a9254086ca7345..afbf01b7364ccbc93c03c04e86a3b0e5b80da0d7 100644 (file)
@@ -139,8 +139,7 @@ static const char *const ioctl_names[] = {
        "CLOSE_DELIVERED"
 };
 
-vchiq_static_assert(ARRAY_SIZE(ioctl_names) ==
-                   (VCHIQ_IOC_MAX + 1));
+vchiq_static_assert(ARRAY_SIZE(ioctl_names) == (VCHIQ_IOC_MAX + 1));
 
 static enum vchiq_status
 vchiq_blocking_bulk_transfer(unsigned int handle, void *data,
@@ -871,8 +870,7 @@ static int vchiq_ioc_dequeue_message(struct vchiq_instance *instance,
                                break;
                        }
                        spin_lock(&msg_queue_spinlock);
-               } while (user_service->msg_remove ==
-                       user_service->msg_insert);
+               } while (user_service->msg_remove == user_service->msg_insert);
 
                if (ret)
                        goto out;
@@ -1083,8 +1081,7 @@ static int vchiq_ioc_await_completion(struct vchiq_instance *instance,
        mutex_lock(&instance->completion_mutex);
 
        DEBUG_TRACE(AWAIT_COMPLETION_LINE);
-       while ((instance->completion_remove ==
-               instance->completion_insert)
+       while ((instance->completion_remove == instance->completion_insert)
                && !instance->closing) {
                int rc;
 
@@ -1924,8 +1921,7 @@ static int vchiq_release(struct inode *inode, struct file *file)
        }
 
        /* Release any closed services */
-       while (instance->completion_remove !=
-               instance->completion_insert) {
+       while (instance->completion_remove != instance->completion_insert) {
                struct vchiq_completion_data_kernel *completion;
                struct vchiq_service *service;
 
index 0ec1c11c690c2bbe22d8e44a3188460f99678c8d..e3b93eda7ef599aa4fb9422a518d022ddf43e9ec 100644 (file)
@@ -685,8 +685,7 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found,
                                spin_lock(&quota_spinlock);
                                count = quota->message_use_count;
                                if (count > 0)
-                                       quota->message_use_count =
-                                               count - 1;
+                                       quota->message_use_count = count - 1;
                                spin_unlock(&quota_spinlock);
 
                                if (count == quota->message_quota) {
@@ -757,8 +756,7 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found,
                        spin_lock(&quota_spinlock);
                        count = state->data_use_count;
                        if (count > 0)
-                               state->data_use_count =
-                                       count - 1;
+                               state->data_use_count = count - 1;
                        spin_unlock(&quota_spinlock);
                        if (count == state->data_quota)
                                complete(&state->data_quota_event);
@@ -899,8 +897,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service,
 
                while ((quota->message_use_count == quota->message_quota) ||
                        ((tx_end_index != quota->previous_tx_index) &&
-                       (quota->slot_use_count ==
-                               quota->slot_quota))) {
+                       (quota->slot_use_count == quota->slot_quota))) {
                        spin_unlock(&quota_spinlock);
                        vchiq_log_trace(vchiq_core_log_level,
                                "%d: qm:%d %s,%zx - quota stall (msg %d, slot %d)",
@@ -1293,8 +1290,7 @@ notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue,
                                        complete(&waiter->event);
                                }
                                spin_unlock(&bulk_waiter_spinlock);
-                       } else if (bulk->mode ==
-                               VCHIQ_BULK_MODE_CALLBACK) {
+                       } else if (bulk->mode == VCHIQ_BULK_MODE_CALLBACK) {
                                enum vchiq_reason reason =
                                                get_bulk_reason(bulk);
                                status = make_service_callback(service,
@@ -2076,8 +2072,7 @@ sync_func(void *v)
                                state->id, header, size, remoteport, localport);
 
                        if ((service->remoteport == remoteport) &&
-                               (service->srvstate ==
-                               VCHIQ_SRVSTATE_OPENSYNC)) {
+                           (service->srvstate == VCHIQ_SRVSTATE_OPENSYNC)) {
                                if (make_service_callback(service,
                                        VCHIQ_MESSAGE_AVAILABLE, header,
                                        NULL) == VCHIQ_RETRY)
@@ -2211,8 +2206,7 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero)
        state->slot_queue_available = 0;
 
        for (i = 0; i < VCHIQ_MAX_SERVICES; i++) {
-               struct vchiq_service_quota *quota =
-                       &state->service_quotas[i];
+               struct vchiq_service_quota *quota = &state->service_quotas[i];
                init_completion(&quota->quota_event);
        }