* [PATCH] fix unnecessary increment in firmware_class_hotplug()
@ 2004-11-25 11:19 Keiichiro Tokunaga
2004-11-26 20:30 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Keiichiro Tokunaga @ 2004-11-25 11:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Keiichiro Tokunaga
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.
Thanks,
Keiichiro Tokunaga
Signed-off-by: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Status: Compiled on 2.6.10-rc2-mm3
---
linux-2.6.10-rc2-mm3-kei/drivers/base/firmware_class.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/base/firmware_class.c~fix_firmware_class_hotplug drivers/base/firmware_class.c
--- linux-2.6.10-rc2-mm3/drivers/base/firmware_class.c~fix_firmware_class_hotplug 2004-11-25 18:31:19.278701104 +0900
+++ linux-2.6.10-rc2-mm3-kei/drivers/base/firmware_class.c 2004-11-25 18:31:37.555922544 +0900
@@ -103,7 +103,7 @@ firmware_class_hotplug(struct class_devi
"FIRMWARE=%s", fw_priv->fw_id))
return -ENOMEM;
- envp[i++] = NULL;
+ envp[i] = NULL;
return 0;
}
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix unnecessary increment in firmware_class_hotplug()
2004-11-25 11:19 [PATCH] fix unnecessary increment in firmware_class_hotplug() Keiichiro Tokunaga
@ 2004-11-26 20:30 ` Marcel Holtmann
2004-11-29 19:07 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2004-11-26 20:30 UTC (permalink / raw)
To: Keiichiro Tokunaga
Cc: Linux Kernel Mailing List, Andrew Morton, Greg Kroah-Hartman
[-- 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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix unnecessary increment in firmware_class_hotplug()
2004-11-26 20:30 ` Marcel Holtmann
@ 2004-11-29 19:07 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-11-29 19:07 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Keiichiro Tokunaga, Linux Kernel Mailing List, Andrew Morton
On Fri, Nov 26, 2004 at 09:30:24PM +0100, Marcel Holtmann wrote:
> 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>
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-29 19:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 11:19 [PATCH] fix unnecessary increment in firmware_class_hotplug() Keiichiro Tokunaga
2004-11-26 20:30 ` Marcel Holtmann
2004-11-29 19:07 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).