Staging: most: aim-sound: sound.c: coding style
Subsystems (2)
cover Staging: most: aim-sound: sound.c: coding style
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(-)
Signature · 1 line
2.15.1
PATCH 1/2 Staging: most: aim-sound: sound.c: fixed an alignment issue
Fixed a coding style issue.
--- drivers/staging/most/aim-sound/sound.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/most/aim-sound/sound.c +6 -6
@@ -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 ;
Signature · 1 line
2.15.1
Greg KH
maintainerRe: [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue
Quoted 6 lines · Philippe Loctaux
Fixed a coding style issue.
Signed-off-by Philippe Loctaux <[email protected]>--- 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
PATCH 2/2 Staging: most: aim-sound: sound.c: removed unnecessary parentheses
In reply to Philippe LoctauxRemoved unnecessary parentheses in a if statement.
--- drivers/staging/most/aim-sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/most/aim-sound/sound.c +1 -1
@@ -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; }
Signature · 1 line
2.15.1
Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
29.12.2017, 02:07, "Philippe Loctaux" <[email protected]>:
Quoted 12 lines
Removed unnecessary parentheses in a if statement.
Signed-off-by Philippe Loctaux <[email protected]>---
drivers/staging/most/aim-sound/sound.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/most/aim-sound/sound.c +0
-0
drivers/staging/most/aim-sound/sound.c static struct channel *get_channel(struct most_interface *iface, · line 171
Quoted 7 lines
drivers/staging/most/aim-sound/sound.c +1
-1@@ -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
Quoted 2 lines
drivers/staging/most/aim-sound/sound.c +0
-1--2.15.1
Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
Quoted 1 line · Ozgur
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.
Greg KH
maintainerRe: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses
In reply to Philippe LoctauxQuoted 6 lines · Philippe Loctaux
Removed unnecessary parentheses in a if statement.
Signed-off-by Philippe Loctaux <[email protected]>--- drivers/staging/most/aim-sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Also not in my tree anymore :(
29.12.2017, 02:07, "Philippe Loctaux" <[email protected]>:
Quoted 1 line
Fixes checkpatch coding style issues.
Hello,
how can i see is changed/patched code lines?
Ozgur
Quoted 9 lines
Philippe Loctaux (2):
Staging: most: aim-sound:sound.c: fixed an alignment issue
Staging: most: aim-sound:sound.c: removed unnecessary parenthesesdrivers/staging/most/aim-sound/sound.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)--
2.15.1