* [PATCH] staging: line6: Fix missing blanks after declarations
@ 2014-03-24 20:51 Fabian Mewes
2014-03-24 21:35 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Fabian Mewes @ 2014-03-24 20:51 UTC (permalink / raw)
To: gregkh
Cc: ashvinivaratharaj, cbajumpa, rashika.kheria, berardi.dav,
monamagarwal123, lisa, ebru.akagunduz, stefanha, dan.carpenter,
devel, linux-kernel, Fabian Mewes
This patch is part of eudyptula challenge task 10
Signed-off-by: Fabian Mewes <architekt@coding4coffee.org>
---
applies to next-20140324
drivers/staging/line6/driver.c | 1 +
drivers/staging/line6/playback.c | 5 +++++
drivers/staging/line6/toneport.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index 77f1b42..ef511c7 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -124,6 +124,7 @@ static int line6_send_raw_message_async_part(struct message *msg,
static int line6_start_listen(struct usb_line6 *line6)
{
int err;
+
usb_fill_int_urb(line6->urb_listen, line6->usbdev,
usb_rcvintpipe(line6->usbdev, line6->ep_control_read),
line6->buffer_listen, LINE6_BUFSIZE_LISTEN,
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index 41869ca..0f72db5 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -34,6 +34,7 @@ static void change_volume(struct urb *urb_out, int volume[],
if (bytes_per_frame == 4) {
short *p, *buf_end;
+
p = (short *)urb_out->transfer_buffer;
buf_end = p + urb_out->transfer_buffer_length / sizeof(*p);
@@ -48,6 +49,7 @@ static void change_volume(struct urb *urb_out, int volume[],
for (; p < buf_end; p += 3) {
int val;
+
val = p[0] + (p[1] << 8) + ((signed char)p[2] << 16);
val = (val * volume[chn & 1]) >> 8;
p[0] = val;
@@ -116,6 +118,7 @@ static void add_monitor_signal(struct urb *urb_out, unsigned char *signal,
if (bytes_per_frame == 4) {
short *pi, *po, *buf_end;
+
pi = (short *)signal;
po = (short *)urb_out->transfer_buffer;
buf_end = po + urb_out->transfer_buffer_length / sizeof(*po);
@@ -171,6 +174,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
if (fsize == 0) {
int n;
+
line6pcm->count_out += frame_increment;
n = line6pcm->count_out / frame_factor;
line6pcm->count_out -= n * frame_factor;
@@ -207,6 +211,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
copy the data to the temp buffer.
*/
int len;
+
len = runtime->buffer_size - line6pcm->pos_out;
if (len > 0) {
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index af2e7e5..dcab647 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -213,6 +213,7 @@ static int snd_toneport_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
const int size = ARRAY_SIZE(toneport_source_info);
+
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
uinfo->value.enumerated.items = size;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: line6: Fix missing blanks after declarations
2014-03-24 20:51 [PATCH] staging: line6: Fix missing blanks after declarations Fabian Mewes
@ 2014-03-24 21:35 ` Joe Perches
2014-03-24 22:46 ` [PATCH v2] staging: line6: Add blank lines " Fabian Mewes
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2014-03-24 21:35 UTC (permalink / raw)
To: Fabian Mewes
Cc: gregkh, ashvinivaratharaj, cbajumpa, rashika.kheria, berardi.dav,
monamagarwal123, lisa, ebru.akagunduz, stefanha, dan.carpenter,
devel, linux-kernel
On Mon, 2014-03-24 at 21:51 +0100, Fabian Mewes wrote:
> This patch is part of eudyptula challenge task 10
>
> Signed-off-by: Fabian Mewes <architekt@coding4coffee.org>
Hi Fabian.
The patch seems fine, but please do not use something
like the above as a commit message.
It would be better to describe _why_ the change should
be done. Something like:
------
Subject: [PATCH] staging: line6: Add blank lines after declarations
Use the more common kernel coding style.
Signed-off-by: your name <your.email@domain.tld>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: line6: Add blank lines after declarations
2014-03-24 21:35 ` Joe Perches
@ 2014-03-24 22:46 ` Fabian Mewes
2014-03-25 8:12 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: Fabian Mewes @ 2014-03-24 22:46 UTC (permalink / raw)
To: joe
Cc: gregkh, ashvinivaratharaj, cbajumpa, rashika.kheria, berardi.dav,
monamagarwal123, lisa, ebru.akagunduz, stefanha, dan.carpenter,
devel, linux-kernel, Fabian Mewes
Use the more common kernel coding style.
Signed-off-by: Fabian Mewes <architekt@coding4coffee.org>
---
applies to next-20140324
v1..v2: improve commit message as suggested by Joe
drivers/staging/line6/driver.c | 1 +
drivers/staging/line6/playback.c | 5 +++++
drivers/staging/line6/toneport.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index 77f1b42..ef511c7 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -124,6 +124,7 @@ static int line6_send_raw_message_async_part(struct message *msg,
static int line6_start_listen(struct usb_line6 *line6)
{
int err;
+
usb_fill_int_urb(line6->urb_listen, line6->usbdev,
usb_rcvintpipe(line6->usbdev, line6->ep_control_read),
line6->buffer_listen, LINE6_BUFSIZE_LISTEN,
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index 41869ca..0f72db5 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -34,6 +34,7 @@ static void change_volume(struct urb *urb_out, int volume[],
if (bytes_per_frame == 4) {
short *p, *buf_end;
+
p = (short *)urb_out->transfer_buffer;
buf_end = p + urb_out->transfer_buffer_length / sizeof(*p);
@@ -48,6 +49,7 @@ static void change_volume(struct urb *urb_out, int volume[],
for (; p < buf_end; p += 3) {
int val;
+
val = p[0] + (p[1] << 8) + ((signed char)p[2] << 16);
val = (val * volume[chn & 1]) >> 8;
p[0] = val;
@@ -116,6 +118,7 @@ static void add_monitor_signal(struct urb *urb_out, unsigned char *signal,
if (bytes_per_frame == 4) {
short *pi, *po, *buf_end;
+
pi = (short *)signal;
po = (short *)urb_out->transfer_buffer;
buf_end = po + urb_out->transfer_buffer_length / sizeof(*po);
@@ -171,6 +174,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
if (fsize == 0) {
int n;
+
line6pcm->count_out += frame_increment;
n = line6pcm->count_out / frame_factor;
line6pcm->count_out -= n * frame_factor;
@@ -207,6 +211,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
copy the data to the temp buffer.
*/
int len;
+
len = runtime->buffer_size - line6pcm->pos_out;
if (len > 0) {
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index af2e7e5..dcab647 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -213,6 +213,7 @@ static int snd_toneport_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
const int size = ARRAY_SIZE(toneport_source_info);
+
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
uinfo->value.enumerated.items = size;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: line6: Add blank lines after declarations
2014-03-24 22:46 ` [PATCH v2] staging: line6: Add blank lines " Fabian Mewes
@ 2014-03-25 8:12 ` Stefan Hajnoczi
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-03-25 8:12 UTC (permalink / raw)
To: Fabian Mewes
Cc: joe, Greg Kroah-Hartman, ashvinivaratharaj, Chris,
rashika.kheria, berardi.dav, monamagarwal123, lisa,
ebru.akagunduz, Dan Carpenter, devel, linux-kernel
On Mon, Mar 24, 2014 at 11:46 PM, Fabian Mewes
<architekt@coding4coffee.org> wrote:
> Use the more common kernel coding style.
>
> Signed-off-by: Fabian Mewes <architekt@coding4coffee.org>
> ---
> applies to next-20140324
> v1..v2: improve commit message as suggested by Joe
>
> drivers/staging/line6/driver.c | 1 +
> drivers/staging/line6/playback.c | 5 +++++
> drivers/staging/line6/toneport.c | 1 +
> 3 files changed, 7 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-25 8:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 20:51 [PATCH] staging: line6: Fix missing blanks after declarations Fabian Mewes
2014-03-24 21:35 ` Joe Perches
2014-03-24 22:46 ` [PATCH v2] staging: line6: Add blank lines " Fabian Mewes
2014-03-25 8:12 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.