* [PATCH 0/3] staging: greybus: Cleanups in loopback_test
@ 2022-12-01 5:38 Jack Schofield
2022-12-01 5:38 ` [PATCH 1/3] staging: greybus: loopback_test: Add blank line after declaration Jack Schofield
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Jack Schofield @ 2022-12-01 5:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Jack Schofield
Correct issues found by checkpatch.
Jack Schofield (3):
staging: greybus: loopback_test: Add blank line after declaration.
staging: greybus: loopback_test: Remove void function return statement
staging: greybus: loopback_test: Remove extra blank lines
drivers/staging/greybus/tools/loopback_test.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
base-commit: 9dadff066244543780e5d9ee406b3ec7af19e22c
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] staging: greybus: loopback_test: Add blank line after declaration.
2022-12-01 5:38 [PATCH 0/3] staging: greybus: Cleanups in loopback_test Jack Schofield
@ 2022-12-01 5:38 ` Jack Schofield
2022-12-01 5:38 ` [PATCH 2/3] staging: greybus: loopback_test: Remove void function return statement Jack Schofield
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Jack Schofield @ 2022-12-01 5:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Jack Schofield
Declarations are to be followed by a blank line. Add to follow Linux
Kernel coding style. Issue reported by checkpatch.
Signed-off-by: Jack Schofield <schofija@oregonstate.edu>
---
drivers/staging/greybus/tools/loopback_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index 4c42e393cd3d..242138c4f6cf 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -675,6 +675,7 @@ static int open_poll_files(struct loopback_test *t)
static int close_poll_files(struct loopback_test *t)
{
int i;
+
for (i = 0; i < t->poll_count; i++)
close(t->fds[i].fd);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] staging: greybus: loopback_test: Remove void function return statement
2022-12-01 5:38 [PATCH 0/3] staging: greybus: Cleanups in loopback_test Jack Schofield
2022-12-01 5:38 ` [PATCH 1/3] staging: greybus: loopback_test: Add blank line after declaration Jack Schofield
@ 2022-12-01 5:38 ` Jack Schofield
2022-12-01 5:38 ` [PATCH 3/3] staging: greybus: loopback_test: Remove extra blank lines Jack Schofield
2022-12-01 7:17 ` [PATCH 0/3] staging: greybus: Cleanups in loopback_test Johan Hovold
3 siblings, 0 replies; 6+ messages in thread
From: Jack Schofield @ 2022-12-01 5:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Jack Schofield
Void function return statement is not useful in this case. Issue
reported by checkpatch.
Signed-off-by: Jack Schofield <schofija@oregonstate.edu>
---
drivers/staging/greybus/tools/loopback_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index 242138c4f6cf..7c1697304ab4 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -862,7 +862,6 @@ void loopback_run(struct loopback_test *t)
err:
printf("Error running test\n");
- return;
}
static int sanity_check(struct loopback_test *t)
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] staging: greybus: loopback_test: Remove extra blank lines
2022-12-01 5:38 [PATCH 0/3] staging: greybus: Cleanups in loopback_test Jack Schofield
2022-12-01 5:38 ` [PATCH 1/3] staging: greybus: loopback_test: Add blank line after declaration Jack Schofield
2022-12-01 5:38 ` [PATCH 2/3] staging: greybus: loopback_test: Remove void function return statement Jack Schofield
@ 2022-12-01 5:38 ` Jack Schofield
2022-12-01 7:17 ` [PATCH 0/3] staging: greybus: Cleanups in loopback_test Johan Hovold
3 siblings, 0 replies; 6+ messages in thread
From: Jack Schofield @ 2022-12-01 5:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Jack Schofield
Clean up extra uses of blank lines that do not follow the kernel coding
style. Issue reported by checkpatch.
Signed-off-by: Jack Schofield <schofija@oregonstate.edu>
---
drivers/staging/greybus/tools/loopback_test.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index 7c1697304ab4..d7ad51ff60c5 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -239,7 +239,6 @@ static void show_loopback_devices(struct loopback_test *t)
for (i = 0; i < t->device_count; i++)
printf("device[%d] = %s\n", i, t->devices[i].name);
-
}
int open_sysfs(const char *sys_pfx, const char *node, int flags)
@@ -274,7 +273,6 @@ float read_sysfs_float_fd(int fd, const char *sys_pfx, const char *node)
char buf[SYSFS_MAX_INT];
if (read(fd, buf, sizeof(buf)) < 0) {
-
fprintf(stderr, "unable to read from %s%s %s\n", sys_pfx, node,
strerror(errno));
close(fd);
@@ -367,7 +365,6 @@ static int get_results(struct loopback_test *t)
r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
r->gbphy_firmware_latency_jitter =
r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;
-
}
/*calculate the aggregate results of all enabled devices */
@@ -407,7 +404,6 @@ static int get_results(struct loopback_test *t)
r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
r->gbphy_firmware_latency_jitter =
r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;
-
}
return 0;
@@ -536,7 +532,6 @@ static int log_results(struct loopback_test *t)
fprintf(stderr, "unable to open %s for appending\n", file_name);
abort();
}
-
}
for (i = 0; i < t->device_count; i++) {
if (!device_enabled(t, i))
@@ -550,10 +545,8 @@ static int log_results(struct loopback_test *t)
if (ret == -1)
fprintf(stderr, "unable to write %d bytes to csv.\n", len);
}
-
}
-
if (t->aggregate_output) {
len = format_output(t, &t->aggregate_results, "aggregate",
data, sizeof(data), &tm);
@@ -741,7 +734,6 @@ static int wait_for_complete(struct loopback_test *t)
ts = &t->poll_timeout;
while (1) {
-
ret = ppoll(t->fds, t->poll_count, ts, &mask_old);
if (ret <= 0) {
stop_tests(t);
@@ -781,7 +773,6 @@ static void prepare_devices(struct loopback_test *t)
if (t->stop_all || device_enabled(t, i))
write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
-
for (i = 0; i < t->device_count; i++) {
if (!device_enabled(t, i))
continue;
@@ -824,7 +815,6 @@ static int start(struct loopback_test *t)
return 0;
}
-
void loopback_run(struct loopback_test *t)
{
int i;
@@ -853,7 +843,6 @@ void loopback_run(struct loopback_test *t)
if (ret)
goto err;
-
get_results(t);
log_results(t);
@@ -881,10 +870,8 @@ static int sanity_check(struct loopback_test *t)
fprintf(stderr, "Bad device mask %x\n", (1 << i));
return -1;
}
-
}
-
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] staging: greybus: Cleanups in loopback_test
2022-12-01 5:38 [PATCH 0/3] staging: greybus: Cleanups in loopback_test Jack Schofield
` (2 preceding siblings ...)
2022-12-01 5:38 ` [PATCH 3/3] staging: greybus: loopback_test: Remove extra blank lines Jack Schofield
@ 2022-12-01 7:17 ` Johan Hovold
2022-12-02 1:33 ` Jack Schofield
3 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2022-12-01 7:17 UTC (permalink / raw)
To: Jack Schofield; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Wed, Nov 30, 2022 at 09:38:49PM -0800, Jack Schofield wrote:
> Correct issues found by checkpatch.
>
> Jack Schofield (3):
> staging: greybus: loopback_test: Add blank line after declaration.
Nit: no need for a full stop in the commit summary.
> staging: greybus: loopback_test: Remove void function return statement
> staging: greybus: loopback_test: Remove extra blank lines
>
> drivers/staging/greybus/tools/loopback_test.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
Other than that, all of these look good to me:
Reviewed-by: Johan Hovold <johan@kernel.org>
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] staging: greybus: Cleanups in loopback_test
2022-12-01 7:17 ` [PATCH 0/3] staging: greybus: Cleanups in loopback_test Johan Hovold
@ 2022-12-02 1:33 ` Jack Schofield
0 siblings, 0 replies; 6+ messages in thread
From: Jack Schofield @ 2022-12-02 1:33 UTC (permalink / raw)
To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Thu, Dec 01, 2022 at 08:17:06AM +0100, Johan Hovold wrote:
> On Wed, Nov 30, 2022 at 09:38:49PM -0800, Jack Schofield wrote:
> > staging: greybus: loopback_test: Add blank line after declaration.
>
> Nit: no need for a full stop in the commit summary.
>
> Other than that, all of these look good to me:
>
> Reviewed-by: Johan Hovold <johan@kernel.org>
Thank you for the review. I've realized I've left off maintainers and
will revise and resend, with correct maintainers and the correction you
suggest.
Jack Schofield
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-02 1:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 5:38 [PATCH 0/3] staging: greybus: Cleanups in loopback_test Jack Schofield
2022-12-01 5:38 ` [PATCH 1/3] staging: greybus: loopback_test: Add blank line after declaration Jack Schofield
2022-12-01 5:38 ` [PATCH 2/3] staging: greybus: loopback_test: Remove void function return statement Jack Schofield
2022-12-01 5:38 ` [PATCH 3/3] staging: greybus: loopback_test: Remove extra blank lines Jack Schofield
2022-12-01 7:17 ` [PATCH 0/3] staging: greybus: Cleanups in loopback_test Johan Hovold
2022-12-02 1:33 ` Jack Schofield
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 NNTP newsgroup(s).