All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: xillybus: fix some coding style errors
@ 2014-07-16 13:19 Vincent Bernat
  2014-08-10  3:34 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Bernat @ 2014-07-16 13:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Eli Billauer, devel, linux-kernel; +Cc: Vincent Bernat

This includes:
 - keep "else" on the same line as the closing brace
 - don't use "else" after "return"
 - don't issue a message for an out-of-memory error
 - blank line after a declaration

Signed-off-by: Vincent Bernat <vincent@bernat.im>
---
 drivers/staging/xillybus/xillybus_core.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c
index ab6502caa72c..2d59734744e5 100644
--- a/drivers/staging/xillybus/xillybus_core.c
+++ b/drivers/staging/xillybus/xillybus_core.c
@@ -138,7 +138,6 @@ irqreturn_t xillybus_isr(int irq, void *data)
 	 * guaranteed no interrupt will occur, but in theory, the cache
 	 * lines may not be updated. So a memory barrier is issued.
 	 */
-
 	smp_rmb();
 
 	buf = ep->msgbuf_addr;
@@ -546,8 +545,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
 			channel->rd_buffers = buffers;
 			rc = xilly_get_dma_buffers(ep, &rd_alloc, buffers,
 						   bufnum, bytebufsize);
-		}
-		else if (channelnum > 0) {
+		} else if (channelnum > 0) {
 			channel->num_wr_buffers = bufnum;
 
 			channel->seekable = seekable;
@@ -610,8 +608,8 @@ static void xilly_scan_idt(struct xilly_endpoint *endpoint,
 			"IDT device name list overflow. Aborting.\n");
 		idt_handle->chandesc = NULL;
 		return;
-	} else
-		idt_handle->chandesc = scan;
+	}
+	idt_handle->chandesc = scan;
 
 	len = endpoint->idtlen - (3 + ((int) (scan - idt)));
 
@@ -722,6 +720,7 @@ static ssize_t xillybus_read(struct file *filp, char __user *userbuf,
 
 	while (1) { /* Note that we may drop mutex within this loop */
 		int bytes_to_do = count - bytes_done;
+
 		spin_lock_irqsave(&channel->wr_spinlock, flags);
 
 		empty = channel->wr_empty;
@@ -1963,10 +1962,8 @@ struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
 	struct xilly_endpoint *endpoint;
 
 	endpoint = devm_kzalloc(dev, sizeof(*endpoint), GFP_KERNEL);
-	if (!endpoint) {
-		dev_err(dev, "Failed to allocate memory. Aborting.\n");
+	if (!endpoint)
 		return NULL;
-	}
 
 	endpoint->pdev = pdev;
 	endpoint->dev = dev;
-- 
2.0.1


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

* Re: [PATCH] staging: xillybus: fix some coding style errors
  2014-07-16 13:19 [PATCH] staging: xillybus: fix some coding style errors Vincent Bernat
@ 2014-08-10  3:34 ` Greg Kroah-Hartman
  2014-08-10 12:16   ` Vincent Bernat
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-08-10  3:34 UTC (permalink / raw)
  To: Vincent Bernat; +Cc: Eli Billauer, devel, linux-kernel

On Wed, Jul 16, 2014 at 03:19:42PM +0200, Vincent Bernat wrote:
> This includes:
>  - keep "else" on the same line as the closing brace
>  - don't use "else" after "return"
>  - don't issue a message for an out-of-memory error
>  - blank line after a declaration
> 
> Signed-off-by: Vincent Bernat <vincent@bernat.im>
> ---
>  drivers/staging/xillybus/xillybus_core.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)

This patch doesn't apply at all, as I think you made it against an old
kernel tree :(

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

* Re: [PATCH] staging: xillybus: fix some coding style errors
  2014-08-10  3:34 ` Greg Kroah-Hartman
@ 2014-08-10 12:16   ` Vincent Bernat
  2014-08-10 12:25     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Bernat @ 2014-08-10 12:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Eli Billauer, devel, linux-kernel

 ❦  9 août 2014 20:34 -0700, Greg Kroah-Hartman <gregkh@linuxfoundation.org> :

>> This includes:
>>  - keep "else" on the same line as the closing brace
>>  - don't use "else" after "return"
>
>>  - don't issue a message for an out-of-memory error
>>  - blank line after a declaration
>> 
>> Signed-off-by: Vincent Bernat <vincent@bernat.im>
>> ---
>>  drivers/staging/xillybus/xillybus_core.c | 13 +++++--------
>>  1 file changed, 5 insertions(+), 8 deletions(-)
>
> This patch doesn't apply at all, as I think you made it against an old
> kernel tree :(

Hi Greg!

You already applied this patch. It is almost one month old. Dunno why
you received it a second time.
-- 
Make sure special cases are truly special.
            - The Elements of Programming Style (Kernighan & Plauger)

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

* Re: [PATCH] staging: xillybus: fix some coding style errors
  2014-08-10 12:16   ` Vincent Bernat
@ 2014-08-10 12:25     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-08-10 12:25 UTC (permalink / raw)
  To: Vincent Bernat; +Cc: Eli Billauer, devel, linux-kernel

On Sun, Aug 10, 2014 at 02:16:04PM +0200, Vincent Bernat wrote:
>  ❦  9 août 2014 20:34 -0700, Greg Kroah-Hartman <gregkh@linuxfoundation.org> :
> 
> >> This includes:
> >>  - keep "else" on the same line as the closing brace
> >>  - don't use "else" after "return"
> >
> >>  - don't issue a message for an out-of-memory error
> >>  - blank line after a declaration
> >> 
> >> Signed-off-by: Vincent Bernat <vincent@bernat.im>
> >> ---
> >>  drivers/staging/xillybus/xillybus_core.c | 13 +++++--------
> >>  1 file changed, 5 insertions(+), 8 deletions(-)
> >
> > This patch doesn't apply at all, as I think you made it against an old
> > kernel tree :(
> 
> Hi Greg!
> 
> You already applied this patch. It is almost one month old. Dunno why
> you received it a second time.

Ugh, you are right, somehow I never flushed it from my queue, sorry for
the noise.

greg k-h

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

end of thread, other threads:[~2014-08-10 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 13:19 [PATCH] staging: xillybus: fix some coding style errors Vincent Bernat
2014-08-10  3:34 ` Greg Kroah-Hartman
2014-08-10 12:16   ` Vincent Bernat
2014-08-10 12:25     ` Greg Kroah-Hartman

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.