mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: sparclinux@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Julia Lawall <julia.lawall@lip6.fr>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 2/2] sparc: Delete an unnecessary initialisation in led_proc_write()
Date: Thu, 25 Aug 2016 10:24:00 +0200	[thread overview]
Message-ID: <e09211e6-4aae-68f8-b912-c1415b4539f0@users.sourceforge.net> (raw)
In-Reply-To: <0ca0235c-ddb9-0534-3bde-b4aaa48da92e@users.sourceforge.net>

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

      parent reply	other threads:[~2016-08-25  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  8:20 [PATCH 0/2] sparc: Fine-tuning for three function implementations SF Markus Elfring
2016-08-25  8:22 ` [PATCH 1/2] sparc: Use kmalloc_array() in three functions SF Markus Elfring
2016-08-29  9:47   ` Paolo Bonzini
2016-08-29 10:36     ` SF Markus Elfring
2016-08-29 11:57     ` walter harms
2016-08-29 16:38       ` Paolo Bonzini
2016-08-25  8:24 ` SF Markus Elfring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e09211e6-4aae-68f8-b912-c1415b4539f0@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=davem@davemloft.net \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome