Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1637323

[PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()
Date 2017-05-08 11:20 +0200
Message-ID <tEMZI-1ZS-19@gated-at.bofh.it> (permalink)
References <tEMZI-1ZS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 8 May 2017 10:32:44 +0200

A bit of data was put into a sequence by two separate function calls.
Print the same data by a single function call instead.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/dma-buf/dma-buf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 512bdbc23bbb..53257c166f4d 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1122,9 +1122,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
 		attach_count = 0;
 
 		list_for_each_entry(attach_obj, &buf_obj->attachments, node) {
-			seq_puts(s, "\t");
-
-			seq_printf(s, "%s\n", dev_name(attach_obj->dev));
+			seq_printf(s, "\t%s\n", dev_name(attach_obj->dev));
 			attach_count++;
 		}
 
-- 
2.12.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] DMA-buf: Fine-tuning for four function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 11:20 +0200
  [PATCH 4/4] dma-buf: Use seq_putc() in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 11:20 +0200
    Re: [PATCH 4/4] dma-buf: Use seq_putc() in two functions Gustavo Padovan <gustavo@padovan.org> - 2017-05-08 16:40 +0200
  [PATCH 1/4] dma-buf: Combine two function calls into one in  dma_buf_debug_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 11:20 +0200
    Re: [PATCH 1/4] dma-buf: Combine two function calls into one in  dma_buf_debug_show() Gustavo Padovan <gustavo@padovan.org> - 2017-05-08 16:40 +0200
  [PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 11:20 +0200
    Re: [PATCH 3/4] dma-buf: Adjust a null pointer check in  dma_buf_attach() Gustavo Padovan <gustavo@padovan.org> - 2017-05-08 16:40 +0200
  [PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 11:20 +0200
    Re: [PATCH 2/4] dma-buf: Improve a size determination in  dma_buf_attach() Gustavo Padovan <gustavo@padovan.org> - 2017-05-08 16:40 +0200
  Re: [PATCH 0/4] DMA-buf: Fine-tuning for four function implementations Sumit Semwal <sumit.semwal@linaro.org> - 2017-05-09 06:30 +0200

csiph-web