lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f4aa26fa-78ad-9dc0-ba4e-23a3d9691630@ideasonboard.com>
Date:   Fri, 4 Sep 2020 12:45:36 +0100
From:   Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
To:     Joe Perches <joe@...ches.com>, Jiri Kosina <trivial@...nel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/29] media: Avoid comma separated statements

On 25/08/2020 05:56, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  drivers/media/i2c/msp3400-kthreads.c      | 12 ++++++++----
>  drivers/media/pci/bt8xx/bttv-cards.c      |  6 ++++--
>  drivers/media/pci/saa7134/saa7134-video.c |  7 +++++--
>  3 files changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
> index d3b0d1c18efd..ac8752c63266 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -549,8 +549,10 @@ int msp3400c_thread(void *data)
>  			val = msp_read_dsp(client, 0x1b);
>  			if (val > 32767)
>  				val -= 65536;
> -			if (val1 < val)
> -				val1 = val, max1 = i;
> +			if (val1 < val) {
> +				val1 = val;
> +				max1 = i;
> +			}
>  			dev_dbg_lvl(&client->dev, 1, msp_debug,
>  				"carrier1 val: %5d / %s\n", val, cd[i].name);
>  		}
> @@ -586,8 +588,10 @@ int msp3400c_thread(void *data)
>  			val = msp_read_dsp(client, 0x1b);
>  			if (val > 32767)
>  				val -= 65536;
> -			if (val2 < val)
> -				val2 = val, max2 = i;
> +			if (val2 < val) {
> +				val2 = val;
> +				max2 = i;
> +			}
>  			dev_dbg_lvl(&client->dev, 1, msp_debug,
>  				"carrier2 val: %5d / %s\n", val, cd[i].name);
>  		}
> diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
> index 16148802dabb..ca20b806e82d 100644
> --- a/drivers/media/pci/bt8xx/bttv-cards.c
> +++ b/drivers/media/pci/bt8xx/bttv-cards.c
> @@ -3934,8 +3934,10 @@ static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
>  			if (checksum != ee[21])
>  				return;
>  			cardid = BTTV_BOARD_OSPREY1x0_848;
> -			for (i = 12; i < 21; i++)
> -				serial *= 10, serial += ee[i] - '0';
> +			for (i = 12; i < 21; i++) {
> +				serial *= 10;
> +				serial += ee[i] - '0';
> +			}
>  		}
>  	} else {
>  		unsigned short type;
> diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
> index a8ac94fadc14..f673cda57f30 100644
> --- a/drivers/media/pci/saa7134/saa7134-video.c
> +++ b/drivers/media/pci/saa7134/saa7134-video.c
> @@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
>  		lines_uv = dev->height >> dev->fmt->vshift;
>  		base2    = base + bpl * dev->height;
>  		base3    = base2 + bpl_uv * lines_uv;
> -		if (dev->fmt->uvswap)
> -			tmp = base2, base2 = base3, base3 = tmp;
> +		if (dev->fmt->uvswap) {
> +			tmp = base2;
> +			base2 = base3;
> +			base3 = tmp;

Don't we have any swap macro helpers for this?

Anyway, that would be out of scope of this patch series.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>

> +		}
>  		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
>  			bpl_uv,lines_uv,base2,base3);
>  		if (V4L2_FIELD_HAS_BOTH(dev->field)) {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ