diff mbox series

[3/7] staging: vchiq_arm: clarify multiplication expressions

Message ID 20210915201824.413202-3-gascoar@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/7] staging: vchiq_arm: cleanup code alignment issues | expand

Commit Message

Gaston Gonzalez Sept. 15, 2021, 8:18 p.m. UTC
Add spaces around '*' in multiplication expressions to enhance
readability.

Reported by checkpatch.pl

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Joe Perches Sept. 16, 2021, 11:24 a.m. UTC | #1
On Wed, 2021-09-15 at 17:18 -0300, Gaston Gonzalez wrote:
> Add spaces around '*' in multiplication expressions to enhance
> readability.
[]
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
[]
> @@ -466,8 +466,8 @@ int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
>  
>  	g_free_fragments = g_fragments_base;
>  	for (i = 0; i < (MAX_FRAGMENTS - 1); i++) {
> -		*(char **)&g_fragments_base[i*g_fragments_size] =
> -			&g_fragments_base[(i + 1)*g_fragments_size];
> +		*(char **)&g_fragments_base[i * g_fragments_size] =
> +			&g_fragments_base[(i + 1) * g_fragments_size];
>  	}
>  	*(char **)&g_fragments_base[i * g_fragments_size] = NULL;

unrelated:

These '*(char **)&' uses are odd and thankfully rare constructs.
diff mbox series

Patch

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 e8b84b2b1ac3..9464a4777ff6 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -466,8 +466,8 @@  int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
 
 	g_free_fragments = g_fragments_base;
 	for (i = 0; i < (MAX_FRAGMENTS - 1); i++) {
-		*(char **)&g_fragments_base[i*g_fragments_size] =
-			&g_fragments_base[(i + 1)*g_fragments_size];
+		*(char **)&g_fragments_base[i * g_fragments_size] =
+			&g_fragments_base[(i + 1) * g_fragments_size];
 	}
 	*(char **)&g_fragments_base[i * g_fragments_size] = NULL;
 	sema_init(&g_free_fragments_sema, MAX_FRAGMENTS);