* [PATCH 2/2] Staging: line6: fixed 80 character coding style issue in midibuf.c This is a patch to the midibuf.c file that fixes up an 80 character error thrown by the checkpatch.pl tool Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
@ 2010-03-28 19:36 Johan Meiring
2010-03-28 20:05 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Johan Meiring @ 2010-03-28 19:36 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Johan Meiring
---
drivers/staging/line6/midibuf.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/line6/midibuf.c b/drivers/staging/line6/midibuf.c
index ab0a5f3..fb2658d 100644
--- a/drivers/staging/line6/midibuf.c
+++ b/drivers/staging/line6/midibuf.c
@@ -76,7 +76,8 @@ int midibuf_bytes_free(struct MidiBuffer *this)
return
midibuf_is_full(this) ?
0 :
- (this->pos_read - this->pos_write + this->size - 1) % this->size + 1;
+ (this->pos_read - this->pos_write + this->size - 1) % \
+ this->size + 1;
}
int midibuf_bytes_used(struct MidiBuffer *this)
@@ -84,7 +85,8 @@ int midibuf_bytes_used(struct MidiBuffer *this)
return
midibuf_is_empty(this) ?
0 :
- (this->pos_write - this->pos_read + this->size - 1) % this->size + 1;
+ (this->pos_write - this->pos_read + this->size - 1) % \
+ this->size + 1;
}
int midibuf_write(struct MidiBuffer *this, unsigned char *data, int length)
@@ -160,7 +162,8 @@ int midibuf_read(struct MidiBuffer *this, unsigned char *data, int length)
this->command_prev = command;
} else {
if (this->command_prev > 0) {
- int midi_length_prev = midibuf_message_length(this->command_prev);
+ int midi_length_prev = \
+ midibuf_message_length(this->command_prev);
if (midi_length_prev > 0) {
midi_length = midi_length_prev - 1;
--
1.6.3.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] Staging: line6: fixed 80 character coding style issue in midibuf.c This is a patch to the midibuf.c file that fixes up an 80 character error thrown by the checkpatch.pl tool Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
2010-03-28 19:36 [PATCH 2/2] Staging: line6: fixed 80 character coding style issue in midibuf.c This is a patch to the midibuf.c file that fixes up an 80 character error thrown by the checkpatch.pl tool Signed-off-by: Johan Meiring <johanmeiring@gmail.com> Johan Meiring
@ 2010-03-28 20:05 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2010-03-28 20:05 UTC (permalink / raw)
To: Johan Meiring; +Cc: gregkh, devel, linux-kernel
On Sun, 2010-03-28 at 21:36 +0200, Johan Meiring wrote:
> ---
> drivers/staging/line6/midibuf.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/line6/midibuf.c b/drivers/staging/line6/midibuf.c
> index ab0a5f3..fb2658d 100644
> --- a/drivers/staging/line6/midibuf.c
> +++ b/drivers/staging/line6/midibuf.c
> @@ -76,7 +76,8 @@ int midibuf_bytes_free(struct MidiBuffer *this)
> return
> midibuf_is_full(this) ?
> 0 :
> - (this->pos_read - this->pos_write + this->size - 1) % this->size + 1;
> + (this->pos_read - this->pos_write + this->size - 1) % \
> + this->size + 1;
It's not necessary to use line continuations like this.
this is an unfortunate variable name, it might be better
to rename it to mb or something.
The "(write - read + size) % size + 1" might be used a
couple of times. Maybe use a macro or function?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-28 20:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-28 19:36 [PATCH 2/2] Staging: line6: fixed 80 character coding style issue in midibuf.c This is a patch to the midibuf.c file that fixes up an 80 character error thrown by the checkpatch.pl tool Signed-off-by: Johan Meiring <johanmeiring@gmail.com> Johan Meiring
2010-03-28 20:05 ` Joe Perches
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®