From: Gabriel Viso Carrera <gabriel@gvisoc.com>
To: andreas.noever@gmail.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Gabriel Viso Carrera <gabriel@gvisoc.com>
Subject: [PATCH 2/3] staging: Thunderbolt: ctl.c: Fixed blank line coding style issues
Date: Sat, 25 Jun 2022 18:49:12 +1000 [thread overview]
Message-ID: <20220625084913.603556-3-gabriel@gvisoc.com> (raw)
In-Reply-To: <20220625084913.603556-1-gabriel@gvisoc.com>
Added blank lines after variable declarations as per checkpatch.pl
(all issues of that kind in the file).
Signed-off-by: Gabriel Viso Carrera <gabriel@gvisoc.com>
---
drivers/thunderbolt/ctl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 4b841fbb3628..6c973fdf7b36 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -232,6 +232,7 @@ static struct tb_cfg_result decode_error(const struct ctl_pkg *response)
struct cfg_error_pkg *pkg = response->buffer;
struct tb_ctl *ctl = response->ctl;
struct tb_cfg_result res = { 0 };
+
res.response_route = tb_cfg_get_route(&pkg->header);
res.response_port = 0;
res.err = check_header(response, sizeof(*pkg), TB_CFG_PKG_ERROR,
@@ -327,6 +328,7 @@ static void tb_ctl_pkg_free(struct ctl_pkg *pkg)
static struct ctl_pkg *tb_ctl_pkg_alloc(struct tb_ctl *ctl)
{
struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL);
+
if (!pkg)
return NULL;
pkg->ctl = ctl;
@@ -346,6 +348,7 @@ static void tb_ctl_tx_callback(struct tb_ring *ring, struct ring_frame *frame,
bool canceled)
{
struct ctl_pkg *pkg = container_of(frame, typeof(*pkg), frame);
+
tb_ctl_pkg_free(pkg);
}
@@ -361,6 +364,7 @@ static int tb_ctl_tx(struct tb_ctl *ctl, const void *data, size_t len,
{
int res;
struct ctl_pkg *pkg;
+
if (len % 4 != 0) { /* required for le->be conversion */
tb_ctl_WARN(ctl, "TX: invalid size: %zu\n", len);
return -EINVAL;
@@ -627,6 +631,7 @@ struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int timeout_msec, event_cb cb,
{
int i;
struct tb_ctl *ctl = kzalloc(sizeof(*ctl), GFP_KERNEL);
+
if (!ctl)
return NULL;
ctl->nhi = nhi;
@@ -700,6 +705,7 @@ void tb_ctl_free(struct tb_ctl *ctl)
void tb_ctl_start(struct tb_ctl *ctl)
{
int i;
+
tb_ctl_dbg(ctl, "control channel starting...\n");
tb_ring_start(ctl->tx); /* is used to ack hotplug packets, start first */
tb_ring_start(ctl->rx);
--
2.36.1
next prev parent reply other threads:[~2022-06-25 9:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 8:49 staging: Thunderbolt: ctl.c style coding issues Gabriel Viso Carrera
2022-06-25 8:49 ` [PATCH 1/3] staging: Thunderbolt: ctl.c: Fixed 2 literal " Gabriel Viso Carrera
2022-06-25 8:49 ` Gabriel Viso Carrera [this message]
2022-06-25 8:49 ` [PATCH 3/3] staging: Thunderbolt: ctl.c: Fixed comment coding style issues Gabriel Viso Carrera
2022-06-25 9:37 ` Joe Perches
2022-06-29 6:54 ` Gabriel Viso Carrera
2022-06-29 7:02 ` Greg KH
2022-06-29 7:47 ` Gabriel Viso Carrera
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=20220625084913.603556-3-gabriel@gvisoc.com \
--to=gabriel@gvisoc.com \
--cc=andreas.noever@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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