Re: [PATCH 2/5] staging: media: av7110: Fix various whitespace checkpatch errors

From: Dan Carpenter
Date: Mon Oct 23 2023 - 10:57:57 EST


On Sat, Oct 21, 2023 at 01:23:29AM +0200, Jonathan Bergh wrote:
> Fixed the following checkpatch errors relating to whitespaces:
> * extra whitespace after '~' symbol
> * remove whitespace before/after parentheses for switch statement and
> function parameters as well as after switch keyword
> * ensure whitespace before '{' braces
> * remove whitespace between function name and '(' parentheses
> * ensure whitespace after ',' commas in parameter lists
>
> Signed-off-by: Jonathan Bergh <bergh.jonathan@xxxxxxxxx>
> ---
> drivers/staging/media/av7110/av7110_av.c | 28 ++++++++++++------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c
> index af3845406626..482dfc548b16 100644
> --- a/drivers/staging/media/av7110/av7110_av.c
> +++ b/drivers/staging/media/av7110/av7110_av.c
> @@ -241,8 +241,8 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
> sync |= DVB_RINGBUFFER_PEEK(buf, 2) << 8;
> sync |= DVB_RINGBUFFER_PEEK(buf, 3);
>
> - if (((sync &~ 0x0f) == 0x000001e0) ||
> - ((sync &~ 0x1f) == 0x000001c0) ||
> + if (((sync &~0x0f) == 0x000001e0) ||
> + ((sync &~0x1f) == 0x000001c0) ||

These should be:

if (((sync & ~0x0f) == 0x000001e0) ||
((sync & ~0x1f) == 0x000001c0) ||


> (sync == 0x000001bd))
> break;
> printk("resync\n");

regards,
dan carpenter