mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: greybus: audio_topology.c: Fixed CHECKS for brace issues
@ 2016-10-11 23:49 Chase Metzger
  2016-10-12  6:04 ` Vaibhav Agarwal
  0 siblings, 1 reply; 2+ messages in thread
From: Chase Metzger @ 2016-10-11 23:49 UTC (permalink / raw)
  To: vaibhav.sr
  Cc: Chase Metzger, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, devel, linux-kernel

Added braces for else and else if statements where checkpatch complained.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
 drivers/staging/greybus/audio_topology.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index b625169..3a2678e 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -1044,8 +1044,10 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
 			control->texts = (const char * const *)
 				gb_generate_enum_strings(module, gbenum);
 			control->items = gbenum->items;
-		} else
+		} else {
 			csize = sizeof(struct gb_audio_control);
+		}
+
 		*w_size += csize;
 		curr = (void *)curr + csize;
 		list_add(&control->list, &module->widget_ctl_list);
@@ -1190,8 +1192,9 @@ static int gbaudio_tplg_process_kcontrols(struct gbaudio_module_info *module,
 			control->texts = (const char * const *)
 				gb_generate_enum_strings(module, gbenum);
 			control->items = gbenum->items;
-		} else
+		} else {
 			csize = sizeof(struct gb_audio_control);
+		}
 
 		list_add(&control->list, &module->ctl_list);
 		dev_dbg(module->dev, "%d:%s created of type %d\n", curr->id,
-- 
2.1.4

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

* Re: [PATCH] drivers: staging: greybus: audio_topology.c: Fixed CHECKS for brace issues
  2016-10-11 23:49 [PATCH] drivers: staging: greybus: audio_topology.c: Fixed CHECKS for brace issues Chase Metzger
@ 2016-10-12  6:04 ` Vaibhav Agarwal
  0 siblings, 0 replies; 2+ messages in thread
From: Vaibhav Agarwal @ 2016-10-12  6:04 UTC (permalink / raw)
  To: Chase Metzger
  Cc: Mark Greer, Johan Hovold, Alex Elder, Greg Kroah-Hartman, devel,
	linux-kernel

On Wed, Oct 12, 2016 at 5:19 AM, Chase Metzger <chasemetzger15@gmail.com> wrote:
> Added braces for else and else if statements where checkpatch complained.
>
> Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
> ---
>  drivers/staging/greybus/audio_topology.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
> index b625169..3a2678e 100644
> --- a/drivers/staging/greybus/audio_topology.c
> +++ b/drivers/staging/greybus/audio_topology.c
> @@ -1044,8 +1044,10 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
>                         control->texts = (const char * const *)
>                                 gb_generate_enum_strings(module, gbenum);
>                         control->items = gbenum->items;
> -               } else
> +               } else {
>                         csize = sizeof(struct gb_audio_control);
> +               }
> +
>                 *w_size += csize;
>                 curr = (void *)curr + csize;
>                 list_add(&control->list, &module->widget_ctl_list);
> @@ -1190,8 +1192,9 @@ static int gbaudio_tplg_process_kcontrols(struct gbaudio_module_info *module,
>                         control->texts = (const char * const *)
>                                 gb_generate_enum_strings(module, gbenum);
>                         control->items = gbenum->items;
> -               } else
> +               } else {
>                         csize = sizeof(struct gb_audio_control);
> +               }
>
>                 list_add(&control->list, &module->ctl_list);
>                 dev_dbg(module->dev, "%d:%s created of type %d\n", curr->id,
> --
> 2.1.4
>
You have already submitted a similar patch available on staging-testing branch:
commit b7e0c9eca426 ("drivers: staging: greybus: Fixed CHECKS for brace issues")

--
thanks,
./va

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

end of thread, other threads:[~2016-10-12  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 23:49 [PATCH] drivers: staging: greybus: audio_topology.c: Fixed CHECKS for brace issues Chase Metzger
2016-10-12  6:04 ` Vaibhav Agarwal

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

all inboxes | Powered by JetHome®