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


Groups > linux.kernel > #1469962 > unrolled thread

[PATCH 0/2] sparc: Fine-tuning for three function implementations

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-08-25 10:30 +0200
Last post2016-08-25 10:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] sparc: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-25 10:30 +0200
    [PATCH 2/2] sparc: Delete an unnecessary initialisation in  led_proc_write() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-25 10:30 +0200

#1469962 — [PATCH 0/2] sparc: Fine-tuning for three function implementations

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-08-25 10:30 +0200
Subject[PATCH 0/2] sparc: Fine-tuning for three function implementations
Message-ID<s9YcW-6Yd-11@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 25 Aug 2016 10:05:45 +0200

A few update suggestions were taken into account
from static source code analysis.

Markus Elfring (2):
  Use kmalloc_array()
  Delete an unnecessary initialisation in led_proc_write()

 arch/sparc/kernel/led.c          | 4 ++--
 arch/sparc/kernel/nmi.c          | 4 +++-
 arch/sparc/kernel/sys_sparc_64.c | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1469964 — [PATCH 2/2] sparc: Delete an unnecessary initialisation in led_proc_write()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-08-25 10:30 +0200
Subject[PATCH 2/2] sparc: Delete an unnecessary initialisation in led_proc_write()
Message-ID<s9YcW-6Yd-23@gated-at.bofh.it>
In reply to#1469962
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 25 Aug 2016 09:55:22 +0200

The local variable "buf" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/sparc/kernel/led.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
index 7444e4a..d6671af 100644
--- a/arch/sparc/kernel/led.c
+++ b/arch/sparc/kernel/led.c
@@ -64,7 +64,7 @@ static int led_proc_open(struct inode *inode, struct file *file)
 static ssize_t led_proc_write(struct file *file, const char __user *buffer,
 			      size_t count, loff_t *ppos)
 {
-	char *buf = NULL;
+	char *buf;
 
 	if (count > LED_MAX_LENGTH)
 		count = LED_MAX_LENGTH;
-- 
2.9.3

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web