public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style
@ 2017-12-28 23:06 Philippe Loctaux
  2017-12-28 23:06 ` [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue Philippe Loctaux
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philippe Loctaux @ 2017-12-28 23:06 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Philippe Loctaux

Fixes checkpatch coding style issues.

Philippe Loctaux (2):
  Staging: most: aim-sound: sound.c: fixed an alignment issue
  Staging: most: aim-sound: sound.c: removed unnecessary parentheses

 drivers/staging/most/aim-sound/sound.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.15.1

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

* [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue
  2017-12-28 23:06 [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Philippe Loctaux
@ 2017-12-28 23:06 ` Philippe Loctaux
  2018-01-08 15:35   ` Greg KH
  2017-12-28 23:06 ` [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses Philippe Loctaux
  2017-12-28 23:14 ` [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Ozgur
  2 siblings, 1 reply; 8+ messages in thread
From: Philippe Loctaux @ 2017-12-28 23:06 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Philippe Loctaux

Fixed a coding style issue.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
---
 drivers/staging/most/aim-sound/sound.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c
index ea1366a44..ab2b0d833 100644
--- a/drivers/staging/most/aim-sound/sound.c
+++ b/drivers/staging/most/aim-sound/sound.c
@@ -235,12 +235,12 @@ static int playback_thread(void *data)
 		struct mbo *mbo = NULL;
 		bool period_elapsed = false;
 
-		wait_event_interruptible(
-			channel->playback_waitq,
-			kthread_should_stop() ||
-			(channel->is_stream_running &&
-			 (mbo = most_get_mbo(channel->iface, channel->id,
-					     &audio_aim))));
+		wait_event_interruptible(channel->playback_waitq,
+					 kthread_should_stop() ||
+					 (channel->is_stream_running &&
+					 (mbo = most_get_mbo(channel->iface,
+							     channel->id,
+							     &audio_aim))));
 		if (!mbo)
 			continue;
 
-- 
2.15.1

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

* [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
  2017-12-28 23:06 [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Philippe Loctaux
  2017-12-28 23:06 ` [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue Philippe Loctaux
@ 2017-12-28 23:06 ` Philippe Loctaux
  2017-12-28 23:19   ` Ozgur
  2018-01-08 15:35   ` Greg KH
  2017-12-28 23:14 ` [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Ozgur
  2 siblings, 2 replies; 8+ messages in thread
From: Philippe Loctaux @ 2017-12-28 23:06 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Philippe Loctaux

Removed unnecessary parentheses in a if statement.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
---
 drivers/staging/most/aim-sound/sound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c
index ab2b0d833..0e79a4898 100644
--- a/drivers/staging/most/aim-sound/sound.c
+++ b/drivers/staging/most/aim-sound/sound.c
@@ -166,7 +166,7 @@ static struct channel *get_channel(struct most_interface *iface,
 	struct channel *channel, *tmp;
 
 	list_for_each_entry_safe(channel, tmp, &dev_list, list) {
-		if ((channel->iface == iface) && (channel->id == channel_id))
+		if (channel->iface == iface && channel->id == channel_id)
 			return channel;
 	}
 
-- 
2.15.1

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

* Re: [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style
  2017-12-28 23:06 [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Philippe Loctaux
  2017-12-28 23:06 ` [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue Philippe Loctaux
  2017-12-28 23:06 ` [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses Philippe Loctaux
@ 2017-12-28 23:14 ` Ozgur
  2 siblings, 0 replies; 8+ messages in thread
From: Ozgur @ 2017-12-28 23:14 UTC (permalink / raw)
  To: Philippe Loctaux, gregkh@linuxfoundation.org
  Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org

29.12.2017, 02:07, "Philippe Loctaux" <loctauxphilippe@gmail.com>:
> Fixes checkpatch coding style issues.

Hello,

how can i see is changed/patched code lines?

Ozgur

> Philippe Loctaux (2):
>   Staging: most: aim-sound: sound.c: fixed an alignment issue
>   Staging: most: aim-sound: sound.c: removed unnecessary parentheses
>
>  drivers/staging/most/aim-sound/sound.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> --
> 2.15.1

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

* Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
  2017-12-28 23:06 ` [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses Philippe Loctaux
@ 2017-12-28 23:19   ` Ozgur
  2017-12-29 14:50     ` Philippe Loctaux
  2018-01-08 15:35   ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Ozgur @ 2017-12-28 23:19 UTC (permalink / raw)
  To: Philippe Loctaux, gregkh@linuxfoundation.org
  Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org



29.12.2017, 02:07, "Philippe Loctaux" <loctauxphilippe@gmail.com>:
> Removed unnecessary parentheses in a if statement.
>
> Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
> ---
>  drivers/staging/most/aim-sound/sound.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c
> index ab2b0d833..0e79a4898 100644
> --- a/drivers/staging/most/aim-sound/sound.c
> +++ b/drivers/staging/most/aim-sound/sound.c
> @@ -166,7 +166,7 @@ static struct channel *get_channel(struct most_interface *iface,
>          struct channel *channel, *tmp;
>
>          list_for_each_entry_safe(channel, tmp, &dev_list, list) {
> - if ((channel->iface == iface) && (channel->id == channel_id))
> + if (channel->iface == iface && channel->id == channel_id)
>                          return channel;
>          }

Hello,

I think this patch is not good, the code will not work. Please should understand in && operator and () why used with C.

Ozgur

> --
> 2.15.1

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

* Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
  2017-12-28 23:19   ` Ozgur
@ 2017-12-29 14:50     ` Philippe Loctaux
  0 siblings, 0 replies; 8+ messages in thread
From: Philippe Loctaux @ 2017-12-29 14:50 UTC (permalink / raw)
  To: Ozgur; +Cc: gregkh, devel, linux-kernel, loctauxphilippe

On Fri, Dec 29, 2017 at 02:19:56AM +0300, Ozgur wrote:
> I think this patch is not good, the code will not work. Please should understand in && operator and () why used with C.

hi,
this patch should work, since it compiles and passes checkpatch.

the reason why i removed the () is because of the && operator, it works
without the need of having () around the statments, which makes the code
simpler to read.

have a nice day.

-phil
loctauxphilippe@gmail.com
https://philippeloctaux.com

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

* Re: [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue
  2017-12-28 23:06 ` [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue Philippe Loctaux
@ 2018-01-08 15:35   ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2018-01-08 15:35 UTC (permalink / raw)
  To: Philippe Loctaux; +Cc: devel, linux-kernel

On Fri, Dec 29, 2017 at 12:06:49AM +0100, Philippe Loctaux wrote:
> Fixed a coding style issue.
> 
> Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
> ---
>  drivers/staging/most/aim-sound/sound.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

This file is not in my tree anymore, please always work off of
linux-next.

thanks,

greg k-h

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

* Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
  2017-12-28 23:06 ` [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses Philippe Loctaux
  2017-12-28 23:19   ` Ozgur
@ 2018-01-08 15:35   ` Greg KH
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2018-01-08 15:35 UTC (permalink / raw)
  To: Philippe Loctaux; +Cc: devel, linux-kernel

On Fri, Dec 29, 2017 at 12:06:50AM +0100, Philippe Loctaux wrote:
> Removed unnecessary parentheses in a if statement.
> 
> Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
> ---
>  drivers/staging/most/aim-sound/sound.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Also not in my tree anymore :(

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

end of thread, other threads:[~2018-01-08 15:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 23:06 [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Philippe Loctaux
2017-12-28 23:06 ` [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue Philippe Loctaux
2018-01-08 15:35   ` Greg KH
2017-12-28 23:06 ` [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses Philippe Loctaux
2017-12-28 23:19   ` Ozgur
2017-12-29 14:50     ` Philippe Loctaux
2018-01-08 15:35   ` Greg KH
2017-12-28 23:14 ` [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style Ozgur

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