All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: greybus: Fixed whitespace style issues
@ 2022-10-10 15:57 Hunter Chasens
  2022-10-10 16:14 ` Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: Hunter Chasens @ 2022-10-10 15:57 UTC (permalink / raw)
  To: outreachy; +Cc: Hunter Chasens

Fixed multiple whitespace and alignment code style issues.
Changed "unsigned long long int" to "unsigned long long" as 'int' was redundent in file 'greybus/Documentation/firmware/authenticate.c'.

Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
---
 .../Documentation/firmware/authenticate.c     |  4 +--
 .../greybus/Documentation/firmware/firmware.c | 34 +++++++++----------
 drivers/staging/greybus/arche-platform.c      |  2 +-
 .../staging/greybus/greybus_authentication.h  |  1 -
 drivers/staging/greybus/loopback.c            |  3 +-
 drivers/staging/greybus/tools/loopback_test.c | 16 +--------
 6 files changed, 22 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/greybus/Documentation/firmware/authenticate.c b/drivers/staging/greybus/Documentation/firmware/authenticate.c
index 3d2c6f88a138..ba4b16b04557 100644
--- a/drivers/staging/greybus/Documentation/firmware/authenticate.c
+++ b/drivers/staging/greybus/Documentation/firmware/authenticate.c
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
 		goto close_fd;
 	}
 
-	printf("UID received: 0x%llx\n", *(unsigned long long int *)(uid.uid));
+	printf("UID received: 0x%llx\n", *(unsigned long long *)(uid.uid));
 
 	/* Get certificate */
 	printf("Get IMS certificate\n");
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
 	}
 
 	printf("Authenticated, result (%02x), sig-size (%02x)\n",
-		authenticate.result_code, authenticate.signature_size);
+	       authenticate.result_code, authenticate.signature_size);
 
 close_fd:
 	close(fd);
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
index 765d69faa9cc..1955a97fc7c4 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware.c
+++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
@@ -47,13 +47,13 @@ static int update_intf_firmware(int fd)
 	ret = ioctl(fd, FW_MGMT_IOC_GET_INTF_FW, &intf_fw_info);
 	if (ret < 0) {
 		printf("Failed to get interface firmware version: %s (%d)\n",
-			fwdev, ret);
+		       fwdev, ret);
 		return -1;
 	}
 
 	printf("Interface Firmware tag (%s), major (%d), minor (%d)\n",
-		intf_fw_info.firmware_tag, intf_fw_info.major,
-		intf_fw_info.minor);
+	       intf_fw_info.firmware_tag, intf_fw_info.major,
+	       intf_fw_info.minor);
 
 	/* Try Interface Firmware load over Unipro */
 	printf("Loading Interface Firmware\n");
@@ -69,20 +69,20 @@ static int update_intf_firmware(int fd)
 	ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
 	if (ret < 0) {
 		printf("Failed to load interface firmware: %s (%d)\n", fwdev,
-			ret);
+		       ret);
 		return -1;
 	}
 
 	if (intf_load.status != GB_FW_U_LOAD_STATUS_VALIDATED &&
 	    intf_load.status != GB_FW_U_LOAD_STATUS_UNVALIDATED) {
 		printf("Load status says loading failed: %d\n",
-			intf_load.status);
+		       intf_load.status);
 		return -1;
 	}
 
 	printf("Interface Firmware (%s) Load done: major: %d, minor: %d, status: %d\n",
-		firmware_tag, intf_load.major, intf_load.minor,
-		intf_load.status);
+	       firmware_tag, intf_load.major, intf_load.minor,
+	       intf_load.status);
 
 	/* Initiate Mode-switch to the newly loaded firmware */
 	printf("Initiate Mode switch\n");
@@ -108,21 +108,21 @@ static int update_backend_firmware(int fd)
 	ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info);
 	if (ret < 0) {
 		printf("Failed to get backend firmware version: %s (%d)\n",
-			fwdev, ret);
+		       fwdev, ret);
 		return -1;
 	}
 
 	printf("Backend Firmware tag (%s), major (%d), minor (%d), status (%d)\n",
-		backend_fw_info.firmware_tag, backend_fw_info.major,
-		backend_fw_info.minor, backend_fw_info.status);
+	       backend_fw_info.firmware_tag, backend_fw_info.major,
+	       backend_fw_info.minor, backend_fw_info.status);
 
 	if (backend_fw_info.status == GB_FW_U_BACKEND_VERSION_STATUS_RETRY)
 		goto retry_fw_version;
 
-	if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS)
-	    && (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
+	if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS) &&
+	    (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
 		printf("Failed to get backend firmware version: %s (%d)\n",
-			fwdev, backend_fw_info.status);
+		       fwdev, backend_fw_info.status);
 		return -1;
 	}
 
@@ -148,10 +148,10 @@ static int update_backend_firmware(int fd)
 
 	if (backend_update.status != GB_FW_U_BACKEND_FW_STATUS_SUCCESS) {
 		printf("Load status says loading failed: %d\n",
-			backend_update.status);
+		       backend_update.status);
 	} else {
 		printf("Backend Firmware (%s) Load done: status: %d\n",
-				firmware_tag, backend_update.status);
+		       firmware_tag, backend_update.status);
 	}
 
 	return 0;
@@ -185,8 +185,8 @@ int main(int argc, char *argv[])
 		fw_timeout = strtoul(argv[4], &endptr, 10);
 
 	printf("Trying Firmware update: fwdev: %s, type: %s, tag: %s, timeout: %u\n",
-		fwdev, fw_update_type == 0 ? "interface" : "backend",
-		firmware_tag, fw_timeout);
+	       fwdev, fw_update_type == 0 ? "interface" : "backend",
+	       firmware_tag, fw_timeout);
 
 	printf("Opening %s firmware management device\n", fwdev);
 
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index fcbd5f71eff2..6f86b0141853 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -179,7 +179,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
 				if (arche_pdata->wake_detect_state !=
 						WD_STATE_COLDBOOT_START) {
 					arche_platform_set_wake_detect_state(arche_pdata,
-									     WD_STATE_COLDBOOT_TRIG);
+									    WD_STATE_COLDBOOT_TRIG);
 					spin_unlock_irqrestore(&arche_pdata->wake_lock,
 							       flags);
 					return IRQ_WAKE_THREAD;
diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
index 7edc7295b7ab..48b4a9794d3c 100644
--- a/drivers/staging/greybus/greybus_authentication.h
+++ b/drivers/staging/greybus/greybus_authentication.h
@@ -41,7 +41,6 @@
 #define CAP_AUTH_RESULT_CR_NO_KEY	0x03
 #define CAP_AUTH_RESULT_CR_SIG_FAIL	0x04
 
-
 /* IOCTL support */
 struct cap_ioc_get_endpoint_uid {
 	__u8			uid[8];
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 1a61fce98056..a6a975a442ad 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -588,8 +588,7 @@ static int gb_loopback_async_sink(struct gb_loopback *gb, u32 len)
 	return retval;
 }
 
-static int gb_loopback_async_transfer_complete(
-				struct gb_loopback_async_operation *op_async)
+static int gb_loopback_async_transfer_complete(struct gb_loopback_async_operation *op_async)
 {
 	struct gb_loopback *gb;
 	struct gb_operation *operation;
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index 4c42e393cd3d..539c7030ffec 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -240,8 +240,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)
 {
 	int fd;
@@ -274,7 +272,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 +364,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,9 +403,7 @@ 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;
 }
 
@@ -537,7 +531,6 @@ static int log_results(struct loopback_test *t)
 			abort();
 		}
 
-	}
 	for (i = 0; i < t->device_count; i++) {
 		if (!device_enabled(t, i))
 			continue;
@@ -550,10 +543,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);
@@ -680,6 +671,7 @@ static int close_poll_files(struct loopback_test *t)
 
 	return 0;
 }
+
 static int is_complete(struct loopback_test *t)
 {
 	int iteration_count;
@@ -740,7 +732,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);
@@ -780,7 +771,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;
@@ -823,7 +813,6 @@ static int start(struct loopback_test *t)
 	return 0;
 }
 
-
 void loopback_run(struct loopback_test *t)
 {
 	int i;
@@ -852,7 +841,6 @@ void loopback_run(struct loopback_test *t)
 	if (ret)
 		goto err;
 
-
 	get_results(t);
 
 	log_results(t);
@@ -881,10 +869,8 @@ static int sanity_check(struct loopback_test *t)
 			fprintf(stderr, "Bad device mask %x\n", (1 << i));
 			return -1;
 		}
-
 	}
 
-
 	return 0;
 }
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 15:57 [PATCH] Staging: greybus: Fixed whitespace style issues Hunter Chasens
@ 2022-10-10 16:14 ` Julia Lawall
       [not found]   ` <CAFJe6O0ADLWOcem3-=EHdKKUHozVP-M1M7VQVY1PCkHr=nMMWg@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2022-10-10 16:14 UTC (permalink / raw)
  To: Hunter Chasens; +Cc: outreachy

On Mon, 10 Oct 2022, Hunter Chasens wrote:

> Fixed multiple whitespace and alignment code style issues.
> Changed "unsigned long long int" to "unsigned long long" as 'int' was redundent in file 'greybus/Documentation/firmware/authenticate.c'.

Thanks for submitting the first patch of this round!

However, it seems not to satisfy the rule that a patch should only do one
thing.  You could send a series.

julia

> Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
> ---
>  .../Documentation/firmware/authenticate.c     |  4 +--
>  .../greybus/Documentation/firmware/firmware.c | 34 +++++++++----------
>  drivers/staging/greybus/arche-platform.c      |  2 +-
>  .../staging/greybus/greybus_authentication.h  |  1 -
>  drivers/staging/greybus/loopback.c            |  3 +-
>  drivers/staging/greybus/tools/loopback_test.c | 16 +--------
>  6 files changed, 22 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/staging/greybus/Documentation/firmware/authenticate.c b/drivers/staging/greybus/Documentation/firmware/authenticate.c
> index 3d2c6f88a138..ba4b16b04557 100644
> --- a/drivers/staging/greybus/Documentation/firmware/authenticate.c
> +++ b/drivers/staging/greybus/Documentation/firmware/authenticate.c
> @@ -58,7 +58,7 @@ int main(int argc, char *argv[])
>  		goto close_fd;
>  	}
>
> -	printf("UID received: 0x%llx\n", *(unsigned long long int *)(uid.uid));
> +	printf("UID received: 0x%llx\n", *(unsigned long long *)(uid.uid));
>
>  	/* Get certificate */
>  	printf("Get IMS certificate\n");
> @@ -85,7 +85,7 @@ int main(int argc, char *argv[])
>  	}
>
>  	printf("Authenticated, result (%02x), sig-size (%02x)\n",
> -		authenticate.result_code, authenticate.signature_size);
> +	       authenticate.result_code, authenticate.signature_size);
>
>  close_fd:
>  	close(fd);
> diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
> index 765d69faa9cc..1955a97fc7c4 100644
> --- a/drivers/staging/greybus/Documentation/firmware/firmware.c
> +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
> @@ -47,13 +47,13 @@ static int update_intf_firmware(int fd)
>  	ret = ioctl(fd, FW_MGMT_IOC_GET_INTF_FW, &intf_fw_info);
>  	if (ret < 0) {
>  		printf("Failed to get interface firmware version: %s (%d)\n",
> -			fwdev, ret);
> +		       fwdev, ret);
>  		return -1;
>  	}
>
>  	printf("Interface Firmware tag (%s), major (%d), minor (%d)\n",
> -		intf_fw_info.firmware_tag, intf_fw_info.major,
> -		intf_fw_info.minor);
> +	       intf_fw_info.firmware_tag, intf_fw_info.major,
> +	       intf_fw_info.minor);
>
>  	/* Try Interface Firmware load over Unipro */
>  	printf("Loading Interface Firmware\n");
> @@ -69,20 +69,20 @@ static int update_intf_firmware(int fd)
>  	ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
>  	if (ret < 0) {
>  		printf("Failed to load interface firmware: %s (%d)\n", fwdev,
> -			ret);
> +		       ret);
>  		return -1;
>  	}
>
>  	if (intf_load.status != GB_FW_U_LOAD_STATUS_VALIDATED &&
>  	    intf_load.status != GB_FW_U_LOAD_STATUS_UNVALIDATED) {
>  		printf("Load status says loading failed: %d\n",
> -			intf_load.status);
> +		       intf_load.status);
>  		return -1;
>  	}
>
>  	printf("Interface Firmware (%s) Load done: major: %d, minor: %d, status: %d\n",
> -		firmware_tag, intf_load.major, intf_load.minor,
> -		intf_load.status);
> +	       firmware_tag, intf_load.major, intf_load.minor,
> +	       intf_load.status);
>
>  	/* Initiate Mode-switch to the newly loaded firmware */
>  	printf("Initiate Mode switch\n");
> @@ -108,21 +108,21 @@ static int update_backend_firmware(int fd)
>  	ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info);
>  	if (ret < 0) {
>  		printf("Failed to get backend firmware version: %s (%d)\n",
> -			fwdev, ret);
> +		       fwdev, ret);
>  		return -1;
>  	}
>
>  	printf("Backend Firmware tag (%s), major (%d), minor (%d), status (%d)\n",
> -		backend_fw_info.firmware_tag, backend_fw_info.major,
> -		backend_fw_info.minor, backend_fw_info.status);
> +	       backend_fw_info.firmware_tag, backend_fw_info.major,
> +	       backend_fw_info.minor, backend_fw_info.status);
>
>  	if (backend_fw_info.status == GB_FW_U_BACKEND_VERSION_STATUS_RETRY)
>  		goto retry_fw_version;
>
> -	if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS)
> -	    && (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
> +	if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS) &&
> +	    (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
>  		printf("Failed to get backend firmware version: %s (%d)\n",
> -			fwdev, backend_fw_info.status);
> +		       fwdev, backend_fw_info.status);
>  		return -1;
>  	}
>
> @@ -148,10 +148,10 @@ static int update_backend_firmware(int fd)
>
>  	if (backend_update.status != GB_FW_U_BACKEND_FW_STATUS_SUCCESS) {
>  		printf("Load status says loading failed: %d\n",
> -			backend_update.status);
> +		       backend_update.status);
>  	} else {
>  		printf("Backend Firmware (%s) Load done: status: %d\n",
> -				firmware_tag, backend_update.status);
> +		       firmware_tag, backend_update.status);
>  	}
>
>  	return 0;
> @@ -185,8 +185,8 @@ int main(int argc, char *argv[])
>  		fw_timeout = strtoul(argv[4], &endptr, 10);
>
>  	printf("Trying Firmware update: fwdev: %s, type: %s, tag: %s, timeout: %u\n",
> -		fwdev, fw_update_type == 0 ? "interface" : "backend",
> -		firmware_tag, fw_timeout);
> +	       fwdev, fw_update_type == 0 ? "interface" : "backend",
> +	       firmware_tag, fw_timeout);
>
>  	printf("Opening %s firmware management device\n", fwdev);
>
> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> index fcbd5f71eff2..6f86b0141853 100644
> --- a/drivers/staging/greybus/arche-platform.c
> +++ b/drivers/staging/greybus/arche-platform.c
> @@ -179,7 +179,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>  				if (arche_pdata->wake_detect_state !=
>  						WD_STATE_COLDBOOT_START) {
>  					arche_platform_set_wake_detect_state(arche_pdata,
> -									     WD_STATE_COLDBOOT_TRIG);
> +									    WD_STATE_COLDBOOT_TRIG);
>  					spin_unlock_irqrestore(&arche_pdata->wake_lock,
>  							       flags);
>  					return IRQ_WAKE_THREAD;
> diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
> index 7edc7295b7ab..48b4a9794d3c 100644
> --- a/drivers/staging/greybus/greybus_authentication.h
> +++ b/drivers/staging/greybus/greybus_authentication.h
> @@ -41,7 +41,6 @@
>  #define CAP_AUTH_RESULT_CR_NO_KEY	0x03
>  #define CAP_AUTH_RESULT_CR_SIG_FAIL	0x04
>
> -
>  /* IOCTL support */
>  struct cap_ioc_get_endpoint_uid {
>  	__u8			uid[8];
> diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> index 1a61fce98056..a6a975a442ad 100644
> --- a/drivers/staging/greybus/loopback.c
> +++ b/drivers/staging/greybus/loopback.c
> @@ -588,8 +588,7 @@ static int gb_loopback_async_sink(struct gb_loopback *gb, u32 len)
>  	return retval;
>  }
>
> -static int gb_loopback_async_transfer_complete(
> -				struct gb_loopback_async_operation *op_async)
> +static int gb_loopback_async_transfer_complete(struct gb_loopback_async_operation *op_async)
>  {
>  	struct gb_loopback *gb;
>  	struct gb_operation *operation;
> diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
> index 4c42e393cd3d..539c7030ffec 100644
> --- a/drivers/staging/greybus/tools/loopback_test.c
> +++ b/drivers/staging/greybus/tools/loopback_test.c
> @@ -240,8 +240,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)
>  {
>  	int fd;
> @@ -274,7 +272,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 +364,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,9 +403,7 @@ 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;
>  }
>
> @@ -537,7 +531,6 @@ static int log_results(struct loopback_test *t)
>  			abort();
>  		}
>
> -	}
>  	for (i = 0; i < t->device_count; i++) {
>  		if (!device_enabled(t, i))
>  			continue;
> @@ -550,10 +543,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);
> @@ -680,6 +671,7 @@ static int close_poll_files(struct loopback_test *t)
>
>  	return 0;
>  }
> +
>  static int is_complete(struct loopback_test *t)
>  {
>  	int iteration_count;
> @@ -740,7 +732,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);
> @@ -780,7 +771,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;
> @@ -823,7 +813,6 @@ static int start(struct loopback_test *t)
>  	return 0;
>  }
>
> -
>  void loopback_run(struct loopback_test *t)
>  {
>  	int i;
> @@ -852,7 +841,6 @@ void loopback_run(struct loopback_test *t)
>  	if (ret)
>  		goto err;
>
> -
>  	get_results(t);
>
>  	log_results(t);
> @@ -881,10 +869,8 @@ static int sanity_check(struct loopback_test *t)
>  			fprintf(stderr, "Bad device mask %x\n", (1 << i));
>  			return -1;
>  		}
> -
>  	}
>
> -
>  	return 0;
>  }
>
> --
> 2.37.3
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
       [not found]   ` <CAFJe6O0ADLWOcem3-=EHdKKUHozVP-M1M7VQVY1PCkHr=nMMWg@mail.gmail.com>
@ 2022-10-10 16:25     ` Julia Lawall
  2022-10-10 16:54       ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2022-10-10 16:25 UTC (permalink / raw)
  To: Hunter Chasens; +Cc: outreachy

[-- Attachment #1: Type: text/plain, Size: 16553 bytes --]



On Mon, 10 Oct 2022, Hunter Chasens wrote:

> Thanks for the feedback! How would you recommend I deliminate this? Maybe separating patches by file, or perhaps type of styling error? Thank you so much for your help! 

On the one hand, you have whitespace problems.  They can all go together.

On the other hand, you have a semantic error, which is the extra int.  So
that change should be in a separate patch from the others.

julia

>
>
> From, Hunter Reed Chasens
> 4th Year Computer Science / Software Engineering AOC
> • Github • LinkedIn • TryHackMe (0x8 Hacker) • HackTheBox •
> www.hunterchasens.com
> hchasens@gmail.com
> chasensh@acm.org
> hunter.chasens18@ncf.edu   
> hchas003@fiu.edu
> Mobile: +1(305)-978-5465
> Pronouns: He/Him
>
>
> On Mon, Oct 10, 2022 at 12:14 PM Julia Lawall <julia.lawall@inria.fr> wrote:
>       On Mon, 10 Oct 2022, Hunter Chasens wrote:
>
>       > Fixed multiple whitespace and alignment code style issues.
>       > Changed "unsigned long long int" to "unsigned long long" as 'int' was redundent in file 'greybus/Documentation/firmware/authenticate.c'.
>
>       Thanks for submitting the first patch of this round!
>
>       However, it seems not to satisfy the rule that a patch should only do one
>       thing.  You could send a series.
>
>       julia
>
>       > Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
>       > ---
>       >  .../Documentation/firmware/authenticate.c     |  4 +--
>       >  .../greybus/Documentation/firmware/firmware.c | 34 +++++++++----------
>       >  drivers/staging/greybus/arche-platform.c      |  2 +-
>       >  .../staging/greybus/greybus_authentication.h  |  1 -
>       >  drivers/staging/greybus/loopback.c            |  3 +-
>       >  drivers/staging/greybus/tools/loopback_test.c | 16 +--------
>       >  6 files changed, 22 insertions(+), 38 deletions(-)
>       >
>       > diff --git a/drivers/staging/greybus/Documentation/firmware/authenticate.c b/drivers/staging/greybus/Documentation/firmware/authenticate.c
>       > index 3d2c6f88a138..ba4b16b04557 100644
>       > --- a/drivers/staging/greybus/Documentation/firmware/authenticate.c
>       > +++ b/drivers/staging/greybus/Documentation/firmware/authenticate.c
>       > @@ -58,7 +58,7 @@ int main(int argc, char *argv[])
>       >               goto close_fd;
>       >       }
>       >
>       > -     printf("UID received: 0x%llx\n", *(unsigned long long int *)(uid.uid));
>       > +     printf("UID received: 0x%llx\n", *(unsigned long long *)(uid.uid));
>       >
>       >       /* Get certificate */
>       >       printf("Get IMS certificate\n");
>       > @@ -85,7 +85,7 @@ int main(int argc, char *argv[])
>       >       }
>       >
>       >       printf("Authenticated, result (%02x), sig-size (%02x)\n",
>       > -             authenticate.result_code, authenticate.signature_size);
>       > +            authenticate.result_code, authenticate.signature_size);
>       >
>       >  close_fd:
>       >       close(fd);
>       > diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
>       > index 765d69faa9cc..1955a97fc7c4 100644
>       > --- a/drivers/staging/greybus/Documentation/firmware/firmware.c
>       > +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
>       > @@ -47,13 +47,13 @@ static int update_intf_firmware(int fd)
>       >       ret = ioctl(fd, FW_MGMT_IOC_GET_INTF_FW, &intf_fw_info);
>       >       if (ret < 0) {
>       >               printf("Failed to get interface firmware version: %s (%d)\n",
>       > -                     fwdev, ret);
>       > +                    fwdev, ret);
>       >               return -1;
>       >       }
>       >
>       >       printf("Interface Firmware tag (%s), major (%d), minor (%d)\n",
>       > -             intf_fw_info.firmware_tag, intf_fw_info.major,
>       > -             intf_fw_info.minor);
>       > +            intf_fw_info.firmware_tag, intf_fw_info.major,
>       > +            intf_fw_info.minor);
>       >
>       >       /* Try Interface Firmware load over Unipro */
>       >       printf("Loading Interface Firmware\n");
>       > @@ -69,20 +69,20 @@ static int update_intf_firmware(int fd)
>       >       ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
>       >       if (ret < 0) {
>       >               printf("Failed to load interface firmware: %s (%d)\n", fwdev,
>       > -                     ret);
>       > +                    ret);
>       >               return -1;
>       >       }
>       >
>       >       if (intf_load.status != GB_FW_U_LOAD_STATUS_VALIDATED &&
>       >           intf_load.status != GB_FW_U_LOAD_STATUS_UNVALIDATED) {
>       >               printf("Load status says loading failed: %d\n",
>       > -                     intf_load.status);
>       > +                    intf_load.status);
>       >               return -1;
>       >       }
>       >
>       >       printf("Interface Firmware (%s) Load done: major: %d, minor: %d, status: %d\n",
>       > -             firmware_tag, intf_load.major, intf_load.minor,
>       > -             intf_load.status);
>       > +            firmware_tag, intf_load.major, intf_load.minor,
>       > +            intf_load.status);
>       >
>       >       /* Initiate Mode-switch to the newly loaded firmware */
>       >       printf("Initiate Mode switch\n");
>       > @@ -108,21 +108,21 @@ static int update_backend_firmware(int fd)
>       >       ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info);
>       >       if (ret < 0) {
>       >               printf("Failed to get backend firmware version: %s (%d)\n",
>       > -                     fwdev, ret);
>       > +                    fwdev, ret);
>       >               return -1;
>       >       }
>       >
>       >       printf("Backend Firmware tag (%s), major (%d), minor (%d), status (%d)\n",
>       > -             backend_fw_info.firmware_tag, backend_fw_info.major,
>       > -             backend_fw_info.minor, backend_fw_info.status);
>       > +            backend_fw_info.firmware_tag, backend_fw_info.major,
>       > +            backend_fw_info.minor, backend_fw_info.status);
>       >
>       >       if (backend_fw_info.status == GB_FW_U_BACKEND_VERSION_STATUS_RETRY)
>       >               goto retry_fw_version;
>       >
>       > -     if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS)
>       > -         && (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
>       > +     if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS) &&
>       > +         (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
>       >               printf("Failed to get backend firmware version: %s (%d)\n",
>       > -                     fwdev, backend_fw_info.status);
>       > +                    fwdev, backend_fw_info.status);
>       >               return -1;
>       >       }
>       >
>       > @@ -148,10 +148,10 @@ static int update_backend_firmware(int fd)
>       >
>       >       if (backend_update.status != GB_FW_U_BACKEND_FW_STATUS_SUCCESS) {
>       >               printf("Load status says loading failed: %d\n",
>       > -                     backend_update.status);
>       > +                    backend_update.status);
>       >       } else {
>       >               printf("Backend Firmware (%s) Load done: status: %d\n",
>       > -                             firmware_tag, backend_update.status);
>       > +                    firmware_tag, backend_update.status);
>       >       }
>       >
>       >       return 0;
>       > @@ -185,8 +185,8 @@ int main(int argc, char *argv[])
>       >               fw_timeout = strtoul(argv[4], &endptr, 10);
>       >
>       >       printf("Trying Firmware update: fwdev: %s, type: %s, tag: %s, timeout: %u\n",
>       > -             fwdev, fw_update_type == 0 ? "interface" : "backend",
>       > -             firmware_tag, fw_timeout);
>       > +            fwdev, fw_update_type == 0 ? "interface" : "backend",
>       > +            firmware_tag, fw_timeout);
>       >
>       >       printf("Opening %s firmware management device\n", fwdev);
>       >
>       > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
>       > index fcbd5f71eff2..6f86b0141853 100644
>       > --- a/drivers/staging/greybus/arche-platform.c
>       > +++ b/drivers/staging/greybus/arche-platform.c
>       > @@ -179,7 +179,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>       >                               if (arche_pdata->wake_detect_state !=
>       >                                               WD_STATE_COLDBOOT_START) {
>       >                                       arche_platform_set_wake_detect_state(arche_pdata,
>       > -                                                                          WD_STATE_COLDBOOT_TRIG);
>       > +                                                                         WD_STATE_COLDBOOT_TRIG);
>       >                                       spin_unlock_irqrestore(&arche_pdata->wake_lock,
>       >                                                              flags);
>       >                                       return IRQ_WAKE_THREAD;
>       > diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
>       > index 7edc7295b7ab..48b4a9794d3c 100644
>       > --- a/drivers/staging/greybus/greybus_authentication.h
>       > +++ b/drivers/staging/greybus/greybus_authentication.h
>       > @@ -41,7 +41,6 @@
>       >  #define CAP_AUTH_RESULT_CR_NO_KEY    0x03
>       >  #define CAP_AUTH_RESULT_CR_SIG_FAIL  0x04
>       >
>       > -
>       >  /* IOCTL support */
>       >  struct cap_ioc_get_endpoint_uid {
>       >       __u8                    uid[8];
>       > diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
>       > index 1a61fce98056..a6a975a442ad 100644
>       > --- a/drivers/staging/greybus/loopback.c
>       > +++ b/drivers/staging/greybus/loopback.c
>       > @@ -588,8 +588,7 @@ static int gb_loopback_async_sink(struct gb_loopback *gb, u32 len)
>       >       return retval;
>       >  }
>       >
>       > -static int gb_loopback_async_transfer_complete(
>       > -                             struct gb_loopback_async_operation *op_async)
>       > +static int gb_loopback_async_transfer_complete(struct gb_loopback_async_operation *op_async)
>       >  {
>       >       struct gb_loopback *gb;
>       >       struct gb_operation *operation;
>       > diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
>       > index 4c42e393cd3d..539c7030ffec 100644
>       > --- a/drivers/staging/greybus/tools/loopback_test.c
>       > +++ b/drivers/staging/greybus/tools/loopback_test.c
>       > @@ -240,8 +240,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)
>       >  {
>       >       int fd;
>       > @@ -274,7 +272,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 +364,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,9 +403,7 @@ 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;
>       >  }
>       >
>       > @@ -537,7 +531,6 @@ static int log_results(struct loopback_test *t)
>       >                       abort();
>       >               }
>       >
>       > -     }
>       >       for (i = 0; i < t->device_count; i++) {
>       >               if (!device_enabled(t, i))
>       >                       continue;
>       > @@ -550,10 +543,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);
>       > @@ -680,6 +671,7 @@ static int close_poll_files(struct loopback_test *t)
>       >
>       >       return 0;
>       >  }
>       > +
>       >  static int is_complete(struct loopback_test *t)
>       >  {
>       >       int iteration_count;
>       > @@ -740,7 +732,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);
>       > @@ -780,7 +771,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;
>       > @@ -823,7 +813,6 @@ static int start(struct loopback_test *t)
>       >       return 0;
>       >  }
>       >
>       > -
>       >  void loopback_run(struct loopback_test *t)
>       >  {
>       >       int i;
>       > @@ -852,7 +841,6 @@ void loopback_run(struct loopback_test *t)
>       >       if (ret)
>       >               goto err;
>       >
>       > -
>       >       get_results(t);
>       >
>       >       log_results(t);
>       > @@ -881,10 +869,8 @@ static int sanity_check(struct loopback_test *t)
>       >                       fprintf(stderr, "Bad device mask %x\n", (1 << i));
>       >                       return -1;
>       >               }
>       > -
>       >       }
>       >
>       > -
>       >       return 0;
>       >  }
>       >
>       > --
>       > 2.37.3
>       >
>       >
>       >
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 16:25     ` Julia Lawall
@ 2022-10-10 16:54       ` Alison Schofield
  2022-10-10 18:45         ` Hunter Chasens
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2022-10-10 16:54 UTC (permalink / raw)
  To: Hunter Chasens; +Cc: Julia Lawall, outreachy

On Mon, Oct 10, 2022 at 06:25:22PM +0200, Julia Lawall wrote:
> 
> 
> On Mon, 10 Oct 2022, Hunter Chasens wrote:
> 
> > Thanks for the feedback! How would you recommend I deliminate this? Maybe separating patches by file, or perhaps type of styling error? Thank you so much for your help! 
> 
> On the one hand, you have whitespace problems.  They can all go together.
> 
> On the other hand, you have a semantic error, which is the extra int.  So
> that change should be in a separate patch from the others.
> 
> julia
> 
Hunter,

Just wanted to chime in that the Ourteachy mailing list archive is
an additional resource (in addition to the First Patch Tutorial).
You don't have to search far into the archive to find sets of cleanup
patches. Follow a couple of those through and see what worked well,
and what revisions were requested.

For example, here I just searched on "0/5" to find some examples of
patchsets. https://lore.kernel.org/outreachy/?q=0%2F5

Welcome to Outreachy Hunter!
Alison

> >
> >
> > From, Hunter Reed Chasens
> > 4th Year Computer Science / Software Engineering AOC
> > • Github • LinkedIn • TryHackMe (0x8 Hacker) • HackTheBox •
> > www.hunterchasens.com
> > hchasens@gmail.com
> > chasensh@acm.org
> > hunter.chasens18@ncf.edu   
> > hchas003@fiu.edu
> > Mobile: +1(305)-978-5465
> > Pronouns: He/Him
> >
> >
> > On Mon, Oct 10, 2022 at 12:14 PM Julia Lawall <julia.lawall@inria.fr> wrote:
> >       On Mon, 10 Oct 2022, Hunter Chasens wrote:
> >
> >       > Fixed multiple whitespace and alignment code style issues.
> >       > Changed "unsigned long long int" to "unsigned long long" as 'int' was redundent in file 'greybus/Documentation/firmware/authenticate.c'.
> >
> >       Thanks for submitting the first patch of this round!
> >
> >       However, it seems not to satisfy the rule that a patch should only do one
> >       thing.  You could send a series.
> >
> >       julia
> >
> >       > Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
> >       > ---
> >       >  .../Documentation/firmware/authenticate.c     |  4 +--
> >       >  .../greybus/Documentation/firmware/firmware.c | 34 +++++++++----------
> >       >  drivers/staging/greybus/arche-platform.c      |  2 +-
> >       >  .../staging/greybus/greybus_authentication.h  |  1 -
> >       >  drivers/staging/greybus/loopback.c            |  3 +-
> >       >  drivers/staging/greybus/tools/loopback_test.c | 16 +--------
> >       >  6 files changed, 22 insertions(+), 38 deletions(-)
> >       >
> >       > diff --git a/drivers/staging/greybus/Documentation/firmware/authenticate.c b/drivers/staging/greybus/Documentation/firmware/authenticate.c
> >       > index 3d2c6f88a138..ba4b16b04557 100644
> >       > --- a/drivers/staging/greybus/Documentation/firmware/authenticate.c
> >       > +++ b/drivers/staging/greybus/Documentation/firmware/authenticate.c
> >       > @@ -58,7 +58,7 @@ int main(int argc, char *argv[])
> >       >               goto close_fd;
> >       >       }
> >       >
> >       > -     printf("UID received: 0x%llx\n", *(unsigned long long int *)(uid.uid));
> >       > +     printf("UID received: 0x%llx\n", *(unsigned long long *)(uid.uid));
> >       >
> >       >       /* Get certificate */
> >       >       printf("Get IMS certificate\n");
> >       > @@ -85,7 +85,7 @@ int main(int argc, char *argv[])
> >       >       }
> >       >
> >       >       printf("Authenticated, result (%02x), sig-size (%02x)\n",
> >       > -             authenticate.result_code, authenticate.signature_size);
> >       > +            authenticate.result_code, authenticate.signature_size);
> >       >
> >       >  close_fd:
> >       >       close(fd);
> >       > diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
> >       > index 765d69faa9cc..1955a97fc7c4 100644
> >       > --- a/drivers/staging/greybus/Documentation/firmware/firmware.c
> >       > +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
> >       > @@ -47,13 +47,13 @@ static int update_intf_firmware(int fd)
> >       >       ret = ioctl(fd, FW_MGMT_IOC_GET_INTF_FW, &intf_fw_info);
> >       >       if (ret < 0) {
> >       >               printf("Failed to get interface firmware version: %s (%d)\n",
> >       > -                     fwdev, ret);
> >       > +                    fwdev, ret);
> >       >               return -1;
> >       >       }
> >       >
> >       >       printf("Interface Firmware tag (%s), major (%d), minor (%d)\n",
> >       > -             intf_fw_info.firmware_tag, intf_fw_info.major,
> >       > -             intf_fw_info.minor);
> >       > +            intf_fw_info.firmware_tag, intf_fw_info.major,
> >       > +            intf_fw_info.minor);
> >       >
> >       >       /* Try Interface Firmware load over Unipro */
> >       >       printf("Loading Interface Firmware\n");
> >       > @@ -69,20 +69,20 @@ static int update_intf_firmware(int fd)
> >       >       ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
> >       >       if (ret < 0) {
> >       >               printf("Failed to load interface firmware: %s (%d)\n", fwdev,
> >       > -                     ret);
> >       > +                    ret);
> >       >               return -1;
> >       >       }
> >       >
> >       >       if (intf_load.status != GB_FW_U_LOAD_STATUS_VALIDATED &&
> >       >           intf_load.status != GB_FW_U_LOAD_STATUS_UNVALIDATED) {
> >       >               printf("Load status says loading failed: %d\n",
> >       > -                     intf_load.status);
> >       > +                    intf_load.status);
> >       >               return -1;
> >       >       }
> >       >
> >       >       printf("Interface Firmware (%s) Load done: major: %d, minor: %d, status: %d\n",
> >       > -             firmware_tag, intf_load.major, intf_load.minor,
> >       > -             intf_load.status);
> >       > +            firmware_tag, intf_load.major, intf_load.minor,
> >       > +            intf_load.status);
> >       >
> >       >       /* Initiate Mode-switch to the newly loaded firmware */
> >       >       printf("Initiate Mode switch\n");
> >       > @@ -108,21 +108,21 @@ static int update_backend_firmware(int fd)
> >       >       ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info);
> >       >       if (ret < 0) {
> >       >               printf("Failed to get backend firmware version: %s (%d)\n",
> >       > -                     fwdev, ret);
> >       > +                    fwdev, ret);
> >       >               return -1;
> >       >       }
> >       >
> >       >       printf("Backend Firmware tag (%s), major (%d), minor (%d), status (%d)\n",
> >       > -             backend_fw_info.firmware_tag, backend_fw_info.major,
> >       > -             backend_fw_info.minor, backend_fw_info.status);
> >       > +            backend_fw_info.firmware_tag, backend_fw_info.major,
> >       > +            backend_fw_info.minor, backend_fw_info.status);
> >       >
> >       >       if (backend_fw_info.status == GB_FW_U_BACKEND_VERSION_STATUS_RETRY)
> >       >               goto retry_fw_version;
> >       >
> >       > -     if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS)
> >       > -         && (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
> >       > +     if ((backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_SUCCESS) &&
> >       > +         (backend_fw_info.status != GB_FW_U_BACKEND_VERSION_STATUS_NOT_AVAILABLE)) {
> >       >               printf("Failed to get backend firmware version: %s (%d)\n",
> >       > -                     fwdev, backend_fw_info.status);
> >       > +                    fwdev, backend_fw_info.status);
> >       >               return -1;
> >       >       }
> >       >
> >       > @@ -148,10 +148,10 @@ static int update_backend_firmware(int fd)
> >       >
> >       >       if (backend_update.status != GB_FW_U_BACKEND_FW_STATUS_SUCCESS) {
> >       >               printf("Load status says loading failed: %d\n",
> >       > -                     backend_update.status);
> >       > +                    backend_update.status);
> >       >       } else {
> >       >               printf("Backend Firmware (%s) Load done: status: %d\n",
> >       > -                             firmware_tag, backend_update.status);
> >       > +                    firmware_tag, backend_update.status);
> >       >       }
> >       >
> >       >       return 0;
> >       > @@ -185,8 +185,8 @@ int main(int argc, char *argv[])
> >       >               fw_timeout = strtoul(argv[4], &endptr, 10);
> >       >
> >       >       printf("Trying Firmware update: fwdev: %s, type: %s, tag: %s, timeout: %u\n",
> >       > -             fwdev, fw_update_type == 0 ? "interface" : "backend",
> >       > -             firmware_tag, fw_timeout);
> >       > +            fwdev, fw_update_type == 0 ? "interface" : "backend",
> >       > +            firmware_tag, fw_timeout);
> >       >
> >       >       printf("Opening %s firmware management device\n", fwdev);
> >       >
> >       > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> >       > index fcbd5f71eff2..6f86b0141853 100644
> >       > --- a/drivers/staging/greybus/arche-platform.c
> >       > +++ b/drivers/staging/greybus/arche-platform.c
> >       > @@ -179,7 +179,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> >       >                               if (arche_pdata->wake_detect_state !=
> >       >                                               WD_STATE_COLDBOOT_START) {
> >       >                                       arche_platform_set_wake_detect_state(arche_pdata,
> >       > -                                                                          WD_STATE_COLDBOOT_TRIG);
> >       > +                                                                         WD_STATE_COLDBOOT_TRIG);
> >       >                                       spin_unlock_irqrestore(&arche_pdata->wake_lock,
> >       >                                                              flags);
> >       >                                       return IRQ_WAKE_THREAD;
> >       > diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
> >       > index 7edc7295b7ab..48b4a9794d3c 100644
> >       > --- a/drivers/staging/greybus/greybus_authentication.h
> >       > +++ b/drivers/staging/greybus/greybus_authentication.h
> >       > @@ -41,7 +41,6 @@
> >       >  #define CAP_AUTH_RESULT_CR_NO_KEY    0x03
> >       >  #define CAP_AUTH_RESULT_CR_SIG_FAIL  0x04
> >       >
> >       > -
> >       >  /* IOCTL support */
> >       >  struct cap_ioc_get_endpoint_uid {
> >       >       __u8                    uid[8];
> >       > diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> >       > index 1a61fce98056..a6a975a442ad 100644
> >       > --- a/drivers/staging/greybus/loopback.c
> >       > +++ b/drivers/staging/greybus/loopback.c
> >       > @@ -588,8 +588,7 @@ static int gb_loopback_async_sink(struct gb_loopback *gb, u32 len)
> >       >       return retval;
> >       >  }
> >       >
> >       > -static int gb_loopback_async_transfer_complete(
> >       > -                             struct gb_loopback_async_operation *op_async)
> >       > +static int gb_loopback_async_transfer_complete(struct gb_loopback_async_operation *op_async)
> >       >  {
> >       >       struct gb_loopback *gb;
> >       >       struct gb_operation *operation;
> >       > diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
> >       > index 4c42e393cd3d..539c7030ffec 100644
> >       > --- a/drivers/staging/greybus/tools/loopback_test.c
> >       > +++ b/drivers/staging/greybus/tools/loopback_test.c
> >       > @@ -240,8 +240,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)
> >       >  {
> >       >       int fd;
> >       > @@ -274,7 +272,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 +364,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,9 +403,7 @@ 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;
> >       >  }
> >       >
> >       > @@ -537,7 +531,6 @@ static int log_results(struct loopback_test *t)
> >       >                       abort();
> >       >               }
> >       >
> >       > -     }
> >       >       for (i = 0; i < t->device_count; i++) {
> >       >               if (!device_enabled(t, i))
> >       >                       continue;
> >       > @@ -550,10 +543,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);
> >       > @@ -680,6 +671,7 @@ static int close_poll_files(struct loopback_test *t)
> >       >
> >       >       return 0;
> >       >  }
> >       > +
> >       >  static int is_complete(struct loopback_test *t)
> >       >  {
> >       >       int iteration_count;
> >       > @@ -740,7 +732,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);
> >       > @@ -780,7 +771,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;
> >       > @@ -823,7 +813,6 @@ static int start(struct loopback_test *t)
> >       >       return 0;
> >       >  }
> >       >
> >       > -
> >       >  void loopback_run(struct loopback_test *t)
> >       >  {
> >       >       int i;
> >       > @@ -852,7 +841,6 @@ void loopback_run(struct loopback_test *t)
> >       >       if (ret)
> >       >               goto err;
> >       >
> >       > -
> >       >       get_results(t);
> >       >
> >       >       log_results(t);
> >       > @@ -881,10 +869,8 @@ static int sanity_check(struct loopback_test *t)
> >       >                       fprintf(stderr, "Bad device mask %x\n", (1 << i));
> >       >                       return -1;
> >       >               }
> >       > -
> >       >       }
> >       >
> >       > -
> >       >       return 0;
> >       >  }
> >       >
> >       > --
> >       > 2.37.3
> >       >
> >       >
> >       >
> >
> >
> >


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 16:54       ` Alison Schofield
@ 2022-10-10 18:45         ` Hunter Chasens
  2022-10-10 20:37           ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Hunter Chasens @ 2022-10-10 18:45 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Julia Lawall, outreachy

Thank you. I only learned about outreach yesterday so I've not had a chance to look through the archives. I'll be sure to do so however! I was very excited to learn about it!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 18:45         ` Hunter Chasens
@ 2022-10-10 20:37           ` Alison Schofield
  2022-10-10 22:05             ` Hunter Chasens
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2022-10-10 20:37 UTC (permalink / raw)
  To: Hunter Chasens; +Cc: Julia Lawall, outreachy

On Mon, Oct 10, 2022 at 02:45:33PM -0400, Hunter Chasens wrote:
> Thank you. I only learned about outreach yesterday so I've not had a chance to look through the archives. I'll be sure to do so however! I was very excited to learn about it!


Hi Hunter,

If you only learned about Outreachy 'yesterday' I'm wondering if you
are an approved applicant. You are welcome to work in our sandbox here
during this month long contribution period but only approved applicants
can apply for the actual internships.

See: https://www.outreachy.org/

Alison 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 20:37           ` Alison Schofield
@ 2022-10-10 22:05             ` Hunter Chasens
  2022-10-11 15:32               ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Hunter Chasens @ 2022-10-10 22:05 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Julia Lawall, outreachy

I've been independently following the instruction posted at https://kernelnewbies.org/. Two days ago the website was updated and the Outreachfirstpatch was listed as the first link. I can't seem to navigate to a lot of the old content. I started reading the page about outreachy[1]. It seemed to cover much of the same material the old pages did. I figured it was an upgrade to the old documentation. Maybe a rebranding of the site. I can't seem to get my email address registered with the old Kernel Newbies mailing list and the IRC seems pretty dead so I thought this was an initiative by KernelNewbies to repark the community. The instructions on the Outreachy page told me to subscribe to your list and email my patches to you guys for review. 

At the bottom of the page, there's some information about being an intern. While I have an interest in that I just wanted to find a community to get feedback on my prospective patches. I have an interest in contributing to the kernel but I've been pursuing it on my own. 

I'm sorry if I've joined a private mailing list or if it's exclusive to those who want to apply. I've just been following the documentation I can find. I was very excited to see the documentation updated since a lot of the KernelNewbies site is outdated. :(

[1] https://kernelnewbies.org/Outreachyfirstpatch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: greybus: Fixed whitespace style issues
  2022-10-10 22:05             ` Hunter Chasens
@ 2022-10-11 15:32               ` Alison Schofield
  0 siblings, 0 replies; 8+ messages in thread
From: Alison Schofield @ 2022-10-11 15:32 UTC (permalink / raw)
  To: Hunter Chasens; +Cc: Julia Lawall, outreachy

On Mon, Oct 10, 2022 at 06:05:53PM -0400, Hunter Chasens wrote:
> I've been independently following the instruction posted at https://kernelnewbies.org/. Two days ago the website was updated and the Outreachfirstpatch was listed as the first link. I can't seem to navigate to a lot of the old content. I started reading the page about outreachy[1]. It seemed to cover much of the same material the old pages did. I figured it was an upgrade to the old documentation. Maybe a rebranding of the site. I can't seem to get my email address registered with the old Kernel Newbies mailing list and the IRC seems pretty dead so I thought this was an initiative by KernelNewbies to repark the community. The instructions on the Outreachy page told me to subscribe to your list and email my patches to you guys for review. 
> 
> At the bottom of the page, there's some information about being an intern. While I have an interest in that I just wanted to find a community to get feedback on my prospective patches. I have an interest in contributing to the kernel but I've been pursuing it on my own. 
> 
> I'm sorry if I've joined a private mailing list or if it's exclusive to those who want to apply. I've just been following the documentation I can find. I was very excited to see the documentation updated since a lot of the KernelNewbies site is outdated. :(

Hi Hunter,

It's your choice to send patches to Outreachy list. If you choose to 
'CC patches to Outreachy list, we're going to ask you to follow
the Outreachy guidelines, and you'll get some extra support in the
next month. (We only have the list open during the contribution
periods.)

This tutorial you found...
> 
> [1] https://kernelnewbies.org/Outreachyfirstpatch

does point to the mailing list. Please join the mailing list, review
what you've missed, and follow along there. Some things won't apply
to you because you are not an actual applicant, but most will.

Alison


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-11 15:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-10 15:57 [PATCH] Staging: greybus: Fixed whitespace style issues Hunter Chasens
2022-10-10 16:14 ` Julia Lawall
     [not found]   ` <CAFJe6O0ADLWOcem3-=EHdKKUHozVP-M1M7VQVY1PCkHr=nMMWg@mail.gmail.com>
2022-10-10 16:25     ` Julia Lawall
2022-10-10 16:54       ` Alison Schofield
2022-10-10 18:45         ` Hunter Chasens
2022-10-10 20:37           ` Alison Schofield
2022-10-10 22:05             ` Hunter Chasens
2022-10-11 15:32               ` Alison Schofield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.