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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Jun 2022 11:09:48 +0100
From:   Daniel Scally <djrscally@...il.com>
To:     Tommaso Merciai <tommaso.merciai@...rulasolutions.com>
Cc:     linuxfancy@...glegroups.com, linux-amarula@...rulasolutions.com,
        quentin.schulz@...obroma-systems.com,
        Jacopo Mondi <jacopo@...ndi.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/6] media: ov5693: count num_supplies using array_size

Hello - sorry, hadn't had much time to look  at this series.

On 30/06/2022 08:45, Tommaso Merciai wrote:
> Instead of hardcode OV5693_NUM_SUPPLIES in a define is better use
> ARRAY_SIZE function to count the number of supplies from
> ov5693_supply_names array
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai@...rulasolutions.com>
> Reviewed-by: Jacopo Mondi <jacopo@...ndi.org>


Reviewed-by: Daniel Scally <djrscally@...il.com>

> ---
> Changes since v3:
>  - Add reviewed-by tag, suggested by Jacopo, Krzysztof
>
>  drivers/media/i2c/ov5693.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> index 117ff5403312..f410333c4c67 100644
> --- a/drivers/media/i2c/ov5693.c
> +++ b/drivers/media/i2c/ov5693.c
> @@ -127,11 +127,15 @@
>  #define OV5693_LINK_FREQ_419_2MHZ		419200000
>  #define OV5693_PIXEL_RATE			167680000
>  
> -/* Miscellaneous */
> -#define OV5693_NUM_SUPPLIES			2
> -
>  #define to_ov5693_sensor(x) container_of(x, struct ov5693_device, sd)
>  
> +static const char * const ov5693_supply_names[] = {
> +	"avdd",		/* Analog power */
> +	"dovdd",	/* Digital I/O power */
> +};
> +
> +#define OV5693_NUM_SUPPLIES	ARRAY_SIZE(ov5693_supply_names)
> +
>  struct ov5693_reg {
>  	u32 reg;
>  	u8 val;
> @@ -352,11 +356,6 @@ static const s64 link_freq_menu_items[] = {
>  	OV5693_LINK_FREQ_419_2MHZ
>  };
>  
> -static const char * const ov5693_supply_names[] = {
> -	"avdd",
> -	"dovdd",
> -};
> -
>  static const char * const ov5693_test_pattern_menu[] = {
>  	"Disabled",
>  	"Random Data",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ