mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* small ISDN fixes
@ 2004-03-02 14:09 Karsten Keil
  0 siblings, 0 replies; only message in thread
From: Karsten Keil @ 2004-03-02 14:09 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, linux-kernel

Hi,

here are small ISDN fixes for the 2.6.4-rc1-bk2 tree.

The first one is only a C99 versus GNU style initializer
change for newer compiler happiness (Thanks to Art Haas)
(Andrew this one is allready in your tree).

The other fix a compiler inlining/optimation problem with
strpbrk, if it has only a one character search string.
(result on missing strchr because the compiler internaly
replace strpbrk with strchr in this case, but after inline
handling stage).


diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/hisax/hisax_fcpcipnp.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/hisax/hisax_fcpcipnp.c
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/hisax/hisax_fcpcipnp.c	2004-03-02 11:24:21.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/hisax/hisax_fcpcipnp.c	2004-03-02 13:46:14.000000000 +0100
@@ -971,10 +971,10 @@
 }
 
 static struct pnp_driver fcpnp_driver = {
-	name:     "fcpnp",
-	probe:    fcpnp_probe,
-	remove:   __devexit_p(fcpnp_remove),
-	id_table: fcpnp_ids,
+	.name		= "fcpnp",
+	.probe		= fcpnp_probe,
+	.remove		= __devexit_p(fcpnp_remove),
+	.id_table	= fcpnp_ids,
 };
 #endif
 
@@ -988,10 +988,10 @@
 }
 
 static struct pci_driver fcpci_driver = {
-	name:     "fcpci",
-	probe:    fcpci_probe,
-	remove:   __devexit_p(fcpci_remove),
-	id_table: fcpci_ids,
+	.name		= "fcpci",
+	.probe		= fcpci_probe,
+	.remove		= __devexit_p(fcpci_remove),
+	.id_table	= fcpci_ids,
 };
 
 static int __init hisax_fcpcipnp_init(void)
diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/icn/icn.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/icn/icn.c
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/icn/icn.c	2003-12-18 03:59:59.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/icn/icn.c	2004-03-02 13:18:59.000000000 +0100
@@ -504,19 +504,19 @@
 		case 3:
 			{
 				char *t = status + 6;
-				char *s = strpbrk(t, ",");
+				char *s = strchr(t, ',');
 
 				*s++ = '\0';
 				strlcpy(cmd.parm.setup.phone, t,
 					sizeof(cmd.parm.setup.phone));
-				s = strpbrk(t = s, ",");
+				s = strchr(t = s, ',');
 				*s++ = '\0';
 				if (!strlen(t))
 					cmd.parm.setup.si1 = 0;
 				else
 					cmd.parm.setup.si1 =
 					    simple_strtoul(t, NULL, 10);
-				s = strpbrk(t = s, ",");
+				s = strchr(t = s, ',');
 				*s++ = '\0';
 				if (!strlen(t))
 					cmd.parm.setup.si2 = 0;
diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/isdnloop/isdnloop.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/isdnloop/isdnloop.c
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/isdnloop/isdnloop.c	2003-12-18 03:57:58.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/isdnloop/isdnloop.c	2004-03-02 13:20:06.000000000 +0100
@@ -122,17 +122,17 @@
 isdnloop_parse_setup(char *setup, isdn_ctrl * cmd)
 {
 	char *t = setup;
-	char *s = strpbrk(t, ",");
+	char *s = strchr(t, ',');
 
 	*s++ = '\0';
 	strlcpy(cmd->parm.setup.phone, t, sizeof(cmd->parm.setup.phone));
-	s = strpbrk(t = s, ",");
+	s = strchr(t = s, ',');
 	*s++ = '\0';
 	if (!strlen(t))
 		cmd->parm.setup.si1 = 0;
 	else
 		cmd->parm.setup.si1 = simple_strtoul(t, NULL, 10);
-	s = strpbrk(t = s, ",");
+	s = strchr(t = s, ',');
 	*s++ = '\0';
 	if (!strlen(t))
 		cmd->parm.setup.si2 = 0;

-- 
Karsten Keil
SuSE Labs
ISDN development

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-02 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 14:09 small ISDN fixes Karsten Keil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®