From: Stefan Wahren <stefan.wahren@i2se.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nicolas Saenz Julienne <nsaenz@kernel.org>
Cc: linux-staging@lists.linux.dev, Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH 17/20] staging: vchiq_arm: Avoid unnecessary line breaks
Date: Sat, 15 May 2021 21:10:56 +0200 [thread overview]
Message-ID: <1621105859-30215-18-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1621105859-30215-1-git-send-email-stefan.wahren@i2se.com>
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>
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 ++++--------
.../vc04_services/interface/vchiq_arm/vchiq_core.c | 18 ++++++------------
2 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index e7b5f14..344f35a 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -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;
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 0ec1c11..e3b93ed 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -685,8 +685,7 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found,
spin_lock("a_spinlock);
count = quota->message_use_count;
if (count > 0)
- quota->message_use_count =
- count - 1;
+ quota->message_use_count = count - 1;
spin_unlock("a_spinlock);
if (count == quota->message_quota) {
@@ -757,8 +756,7 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found,
spin_lock("a_spinlock);
count = state->data_use_count;
if (count > 0)
- state->data_use_count =
- count - 1;
+ state->data_use_count = count - 1;
spin_unlock("a_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("a_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("a->quota_event);
}
--
2.7.4
next prev parent reply other threads:[~2021-05-15 19:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 19:10 [PATCH 00/20] staging: vchiq_arm: more code clean-up Stefan Wahren
2021-05-15 19:10 ` [PATCH 01/20] staging: vchiq_core: fix return type of vchiq_init_state Stefan Wahren
2021-05-16 7:27 ` Fabio Aiuto
2021-05-16 9:38 ` Stefan Wahren
2021-05-16 16:54 ` Fabio Aiuto
2021-05-17 11:25 ` Dan Carpenter
2021-05-15 19:10 ` [PATCH 02/20] staging: vchiq_core: drop unnecessary release_count Stefan Wahren
2021-05-15 19:10 ` [PATCH 03/20] staging: vchiq_core: separate postfix increment Stefan Wahren
2021-05-16 7:31 ` Fabio Aiuto
2021-05-15 19:10 ` [PATCH 04/20] staging: vc04_services: remove __VCCOREVER__ Stefan Wahren
2021-05-15 19:10 ` [PATCH 05/20] staging: vchiq_arm: balance braces for if-else statements Stefan Wahren
2021-05-15 19:10 ` [PATCH 06/20] staging: vchiq_core: introduce poll_services_of_group Stefan Wahren
2021-05-15 19:10 ` [PATCH 07/20] staging: vchiq_core: avoid indention in poll_services_of_group Stefan Wahren
2021-05-15 19:10 ` [PATCH 08/20] staging: vchiq_arm: Use define for doorbell irq Stefan Wahren
2021-05-15 19:10 ` [PATCH 09/20] staging: vchiq_arm: drop ftrace-like logging Stefan Wahren
2021-05-15 19:10 ` [PATCH 10/20] staging: vchiq_arm: Prefer kzalloc(sizeof(*waiter)...) Stefan Wahren
2021-05-15 19:10 ` [PATCH 11/20] staging: vchiq_arm: drop non-beneficial comments Stefan Wahren
2021-05-15 19:10 ` [PATCH 12/20] staging: vchiq_arm: add blank line after declarations Stefan Wahren
2021-05-15 19:10 ` [PATCH 13/20] staging: vchiq_arm: re-arrange function header Stefan Wahren
2021-05-15 19:10 ` [PATCH 14/20] staging: vchiq_core: reduce indention in release_service_messages Stefan Wahren
2021-05-15 19:10 ` [PATCH 15/20] staging: vchiq_core: fix comment in vchiq_shutdown_internal Stefan Wahren
2021-05-15 19:10 ` [PATCH 16/20] staging: vchiq_arm: make vchiq_shutdown_internal return void Stefan Wahren
2021-05-15 19:10 ` Stefan Wahren [this message]
2021-05-15 19:10 ` [PATCH 18/20] staging: vchiq_core: introduce parse_message Stefan Wahren
2021-05-17 11:49 ` Dan Carpenter
2021-05-17 17:38 ` Stefan Wahren
2021-05-18 7:36 ` Dan Carpenter
2021-05-15 19:10 ` [PATCH 19/20] staging: vchiq_core: introduce defines for close_recvd Stefan Wahren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621105859-30215-18-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=nsaenz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).