2021-03-21 09:23:47

by Fengfei Xi

[permalink] [raw]
Subject: [PATCH] sound: remove unnecessary blank

Remove unnecessary blank when calling kmalloc_array().

Signed-off-by: Fengfei Xi <[email protected]>
---
sound/oss/dmasound/dmasound_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index 49679aa86..78bb9dfe2 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -421,7 +421,7 @@ static int sq_allocate_buffers(struct sound_queue *sq, int num, int size)
return 0;
sq->numBufs = num;
sq->bufSize = size;
- sq->buffers = kmalloc_array (num, sizeof(char *), GFP_KERNEL);
+ sq->buffers = kmalloc_array(num, sizeof(char *), GFP_KERNEL);
if (!sq->buffers)
return -ENOMEM;
for (i = 0; i < num; i++) {
--
2.17.1


2021-03-22 11:27:06

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH] sound: remove unnecessary blank

On Sun, 21 Mar 2021 09:59:48 +0100,
Fengfei Xi wrote:
>
> Remove unnecessary blank when calling kmalloc_array().
>
> Signed-off-by: Fengfei Xi <[email protected]>

Thanks for the patch.

We apply this kind of trivial coding-style fix only if it'd improve
the readability significantly or when it's a preliminary work for the
other actual fixes. So if you'd work on this driver further, let us
know.


Takashi

> ---
> sound/oss/dmasound/dmasound_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
> index 49679aa86..78bb9dfe2 100644
> --- a/sound/oss/dmasound/dmasound_core.c
> +++ b/sound/oss/dmasound/dmasound_core.c
> @@ -421,7 +421,7 @@ static int sq_allocate_buffers(struct sound_queue *sq, int num, int size)
> return 0;
> sq->numBufs = num;
> sq->bufSize = size;
> - sq->buffers = kmalloc_array (num, sizeof(char *), GFP_KERNEL);
> + sq->buffers = kmalloc_array(num, sizeof(char *), GFP_KERNEL);
> if (!sq->buffers)
> return -ENOMEM;
> for (i = 0; i < num; i++) {
> --
> 2.17.1
>