Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 2/4] qmi: voicecall: Fix up code style violations
Date: Mon, 22 Apr 2024 16:40:44 -0500	[thread overview]
Message-ID: <20240422214058.3411417-2-denkenz@gmail.com> (raw)
In-Reply-To: <20240422214058.3411417-1-denkenz@gmail.com>

Fix up some style violations:
 - > 80 character lines
 - Redundant parenthesis

Also, while here, fix up a typo: "informations" -> "information"
---
 drivers/qmimodem/voicecall.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/qmimodem/voicecall.c b/drivers/qmimodem/voicecall.c
index 24c4f3f175c3..5afa3a057a71 100644
--- a/drivers/qmimodem/voicecall.c
+++ b/drivers/qmimodem/voicecall.c
@@ -90,7 +90,7 @@ static bool ofono_call_match_by_id(const void *a, const void *b)
 	const struct ofono_call *call = a;
 	unsigned int id = L_PTR_TO_UINT(b);
 
-	return (call->id == id);
+	return call->id == id;
 }
 
 static bool ofono_call_match_by_status(const void *a, const void *b)
@@ -294,7 +294,7 @@ static void all_call_status_ind(struct qmi_result *result, void *user_data)
 	}
 
 	if (!call_information->size) {
-		DBG("No call informations received!");
+		DBG("No call information received!");
 		return;
 	}
 
@@ -370,9 +370,11 @@ static void all_call_status_ind(struct qmi_result *result, void *user_data)
 		call->direction = qmi_to_ofono_direction(call_info.direction);
 		call->type = 0; /* always voice */
 
-		number_size = MIN(remote_party->number_size, OFONO_MAX_PHONE_NUMBER_LENGTH);
+		number_size = MIN(remote_party->number_size,
+						OFONO_MAX_PHONE_NUMBER_LENGTH);
 		tmp = l_strndup(remote_party->number, number_size);
-		l_strlcpy(call->phone_number.number, tmp, sizeof(call->phone_number.number));
+		l_strlcpy(call->phone_number.number, tmp,
+				sizeof(call->phone_number.number));
 		l_free(tmp);
 
 		if (strlen(call->phone_number.number) > 0)
@@ -489,7 +491,8 @@ static void answer_cb(struct qmi_result *result, void *user_data)
 	CALLBACK_WITH_SUCCESS(cb, cbd->data);
 }
 
-static void answer(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, void *data)
+static void answer(struct ofono_voicecall *vc,
+					ofono_voicecall_cb_t cb, void *data)
 {
 	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 	struct cb_data *cbd;
@@ -679,4 +682,3 @@ static const struct ofono_voicecall_driver driver = {
 };
 
 OFONO_ATOM_DRIVER_BUILTIN(voicecall, qmimodem, &driver)
-
-- 
2.44.0


  reply	other threads:[~2024-04-22 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 21:40 [PATCH 1/4] qmi: Remove redundant NULL check in qmi_param_new Denis Kenzior
2024-04-22 21:40 ` Denis Kenzior [this message]
2024-04-22 21:40 ` [PATCH 3/4] qmi: voicecall: Remove ternary conditional use Denis Kenzior
2024-04-22 21:40 ` [PATCH 4/4] qmi: voicecall: Remove redundant initialization to NULL Denis Kenzior
2024-04-22 22:30 ` [PATCH 1/4] qmi: Remove redundant NULL check in qmi_param_new patchwork-bot+ofono

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=20240422214058.3411417-2-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /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