public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Greg Kroah-Hartman <greg@kroah.com>
Subject: Re: [PATCH] fix unnecessary increment in firmware_class_hotplug()
Date: Fri, 26 Nov 2004 21:30:24 +0100	[thread overview]
Message-ID: <1101501024.6514.52.camel@pegasus> (raw)
In-Reply-To: <20041125201935.213944c9.tokunaga.keiich@jp.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Hi Keiichiro,

>   This patch is to fix unnecessary increment of 'i' used to
> specify an element of an arry 'envp[]' in firmware_class_hotplug().
> The 'i' is already incremented in add_hotplug_env_var(), actually.

you are right. The incrementation is wrong, but it doesn't have any
negative effect. However the same applies for the usb_hotplug() function
in drivers/usb/core/usb.c.

> Signed-off-by: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 596 bytes --]

===== drivers/usb/core/usb.c 1.182 vs edited =====
--- 1.182/drivers/usb/core/usb.c	2004-11-07 23:31:07 +01:00
+++ edited/drivers/usb/core/usb.c	2004-11-26 21:27:08 +01:00
@@ -656,7 +656,7 @@
 			return -ENOMEM;
 	}
 
-	envp[i++] = NULL;
+	envp[i] = NULL;
 
 	return 0;
 }
===== drivers/base/firmware_class.c 1.24 vs edited =====
--- 1.24/drivers/base/firmware_class.c	2004-11-08 03:16:05 +01:00
+++ edited/drivers/base/firmware_class.c	2004-11-26 21:26:48 +01:00
@@ -103,7 +103,7 @@
 			"FIRMWARE=%s", fw_priv->fw_id))
 		return -ENOMEM;
 
-	envp[i++] = NULL;
+	envp[i] = NULL;
 
 	return 0;
 }

  reply	other threads:[~2004-11-26 20:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 11:19 [PATCH] fix unnecessary increment in firmware_class_hotplug() Keiichiro Tokunaga
2004-11-26 20:30 ` Marcel Holtmann [this message]
2004-11-29 19:07   ` Greg KH

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=1101501024.6514.52.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tokunaga.keiich@jp.fujitsu.com \
    /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