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]
Message-ID: <1822236810.335136.1540871186977@webmail.strato.com>
Date:   Tue, 30 Oct 2018 04:46:26 +0100 (CET)
From:   Ulrich Hecht <uli@...nd.eu>
To:     Jacopo Mondi <jacopo+renesas@...ndi.org>, geert+renesas@...der.be,
        laurent.pinchart@...asonboard.com, horms@...ge.net.au
Cc:     linus.walleij@...aro.org, linux-renesas-soc@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: Introduce VIN_DATA_PIN_GROUP_VER


> On October 29, 2018 at 7:13 PM Jacopo Mondi <jacopo+renesas@...ndi.org> wrote:
> 
> 
> VIN data groups may appear on different sets of pins, usually named
> "vinX_data_[a|b]". The existing VIN_DATA_PIN_GROUP() does not support appending
> the 'a' or 'b' suffix, leading to the definition of groups names not consistent
> with the ones defined using SH_PFC_PIN_GROUP() macro.
> 
> Fix this by adding a macro that supports appending suffixes when required.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@...ndi.org>
> ---
>  drivers/pinctrl/sh-pfc/sh_pfc.h | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
> index 458ae0a..2930e9a 100644
> --- a/drivers/pinctrl/sh-pfc/sh_pfc.h
> +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
> @@ -54,17 +54,27 @@ struct sh_pfc_pin_group {
>  
>  /*
>   * Using union vin_data saves memory occupied by the VIN data pins.
> - * VIN_DATA_PIN_GROUP() is  a macro  used  to describe the VIN pin groups
> - * in this case.
> + *
> + * VIN_DATA_PIN_GROUP() is  a macro  used  to describe the VIN pin groups,

Maybe fix the odd spacing, while you're at it?

> + * while VIN_DATA_PIN_GROUP_VER() is used when the same pin group can appear
> + * on different sets of pins.
>   */
> -#define VIN_DATA_PIN_GROUP(n, s)				\
> -	{							\
> -		.name = #n#s,					\
> +#define __VIN_DATA_PIN_GROUP(n, s)				\
>  		.pins = n##_pins.data##s,			\
>  		.mux = n##_mux.data##s,				\
>  		.nr_pins = ARRAY_SIZE(n##_pins.data##s),	\
>  	}
>  
> +#define VIN_DATA_PIN_GROUP(n, s)				\
> +	{							\
> +		.name = #n#s,					\
> +		__VIN_DATA_PIN_GROUP(n, s)
> +
> +#define VIN_DATA_PIN_GROUP_VER(n, v, s)				\
> +	{							\
> +		.name = #n#s"_"#v,				\
> +		__VIN_DATA_PIN_GROUP(n##_##v, s)
> +
>  union vin_data {
>  	unsigned int data24[24];
>  	unsigned int data20[20];
> -- 
> 2.7.4
>

With or without the whitespace fix:

Reviewed-by: Ulrich Hecht <uli+renesas@...nd.eu>

CU
Uli

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ