Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal
@ 2022-11-09 15:23 Andy Shevchenko
  2022-11-09 15:28 ` Basavaraj Natikar
  2022-11-10  9:53 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-11-09 15:23 UTC (permalink / raw)
  To: Andy Shevchenko, Basavaraj Natikar, linux-gpio, linux-kernel
  Cc: Linus Walleij

It's slightly better to read when compound literal data and type
are separated by a space.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

It also standard practice in the kernel:

$ git grep -l '(struct [^()]\+) {' | wc -l
1384

$ git grep -l '(struct [^()]\+){' | wc -l
306

 include/linux/pinctrl/pinctrl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 487117ccb1bc..f6ff2590657d 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -40,7 +40,7 @@ struct pingroup {
 
 /* Convenience macro to define a single named or anonymous pingroup */
 #define PINCTRL_PINGROUP(_name, _pins, _npins)	\
-(struct pingroup){				\
+(struct pingroup) {				\
 	.name = _name,				\
 	.pins = _pins,				\
 	.npins = _npins,			\
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal
  2022-11-09 15:23 [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal Andy Shevchenko
@ 2022-11-09 15:28 ` Basavaraj Natikar
  2022-11-10  9:53 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Basavaraj Natikar @ 2022-11-09 15:28 UTC (permalink / raw)
  To: Andy Shevchenko, Basavaraj Natikar, linux-gpio, linux-kernel
  Cc: Linus Walleij



On 11/9/2022 8:53 PM, Andy Shevchenko wrote:
> It's slightly better to read when compound literal data and type
> are separated by a space.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> It also standard practice in the kernel:
>
> $ git grep -l '(struct [^()]\+) {' | wc -l
> 1384
>
> $ git grep -l '(struct [^()]\+){' | wc -l
> 306
>
>  include/linux/pinctrl/pinctrl.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
> index 487117ccb1bc..f6ff2590657d 100644
> --- a/include/linux/pinctrl/pinctrl.h
> +++ b/include/linux/pinctrl/pinctrl.h
> @@ -40,7 +40,7 @@ struct pingroup {
>  
>  /* Convenience macro to define a single named or anonymous pingroup */
>  #define PINCTRL_PINGROUP(_name, _pins, _npins)	\
> -(struct pingroup){				\
> +(struct pingroup) {				\
>  	.name = _name,				\
>  	.pins = _pins,				\
>  	.npins = _npins,			\

Looks good to me

Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>

Thanks,
--
Basavaraj


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal
  2022-11-09 15:23 [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal Andy Shevchenko
  2022-11-09 15:28 ` Basavaraj Natikar
@ 2022-11-10  9:53 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-11-10  9:53 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Basavaraj Natikar, linux-gpio, linux-kernel

On Wed, Nov 9, 2022 at 4:23 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> It's slightly better to read when compound literal data and type
> are separated by a space.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-10  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09 15:23 [PATCH v1 1/1] pinctrl: Put space between type and data in compound literal Andy Shevchenko
2022-11-09 15:28 ` Basavaraj Natikar
2022-11-10  9:53 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox