Skip to contentSkip to conversation

2.4.20pre5 trivial compiler warning fix for irtty.c

PATCH Andreas Steinmetz 2 participants 2 messages Sep 5, 2002 – Sep 6, 2002 Networking

lore
Share & tools
lore
#0 lore raw

the attached patch fixes deprecated usage warnings for __FUNCTION__ in irtty.c.

Signature · 2 lines
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
net/irda/irtty.c renamed from net/irda/irtty.c.orig +7 -8
@@ -121,9 +121,8 @@
 	
 	/* Unregister tty line-discipline */
 	if ((ret = tty_register_ldisc(N_IRDA, NULL))) {
-		ERROR(__FUNCTION__ 
-		      "(), can't unregister line discipline (err = %d)\n",
-		      ret);
+		ERROR("%s(), can't unregister line discipline (err = %d)\n",
+		      __FUNCTION__,ret);
 	}
 
 	/*
@@ -230,7 +229,7 @@
 	self->rx_buff.data = self->rx_buff.head;
 	
 	if (!(dev = dev_alloc("irda%d", &err))) {
-		ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
+		ERROR("%s(), dev_alloc() failed!\n",__FUNCTION__);
 		return -ENOMEM;
 	}
 
@@ -249,7 +248,7 @@
 	err = register_netdevice(dev);
 	rtnl_unlock();
 	if (err) {
-		ERROR(__FUNCTION__ "(), register_netdev() failed!\n");
+		ERROR("%s(), register_netdev() failed!\n",__FUNCTION__);
 		return -1;
 	}
 
@@ -455,8 +454,8 @@
 			irda_task_next_state(task, IRDA_TASK_CHILD_DONE);
 		break;
 	case IRDA_TASK_CHILD_WAIT:
-		WARNING(__FUNCTION__ 
-			"(), changing speed of dongle timed out!\n");
+		WARNING("%s(), changing speed of dongle timed out!\n",
+			__FUNCTION__);
 		ret = -1;		
 		break;
 	case IRDA_TASK_CHILD_DONE:
@@ -467,7 +466,7 @@
 		self->task = NULL;
 		break;
 	default:
-		ERROR(__FUNCTION__ "(), unknown state %d\n", task->state);
+		ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
 		irda_task_next_state(task, IRDA_TASK_DONE);
 		self->task = NULL;
 		ret = -1;
#1 lore raw
Quoted 2 lines · Andreas Steinmetz

the attached patch fixes deprecated usage warnings for __FUNCTION__ in irtty.c.

Hi Andreas,

a similar patch is already in -ac. It's perhaps the best if you make such patches against -ac because -ac contains several smaller cleanups and fixes that aren't yet in 2.4.20pre.

cu
Adrian

Signature · 3 lines
You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
								Alan Cox