mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* set_bit takes a long in irda
@ 2002-04-27 12:16 Paul Mackerras
  0 siblings, 0 replies; only message in thread
From: Paul Mackerras @ 2002-04-27 12:16 UTC (permalink / raw)
  To: jt; +Cc: linux-kernel

There were a couple of places in the irda code where set_bit and
friends were being used on int variables.  This is bad because some
architectures require long alignment for atomic operations, and also
because it now gives a compile error in 2.5.x.

Here is a patch to fix the problems for 2.5.11.

Thanks,
Paul.

diff -urN linux-2.5/include/net/irda/irlmp.h pmac-2.5/include/net/irda/irlmp.h
--- linux-2.5/include/net/irda/irlmp.h	Sat Apr 27 20:51:23 2002
+++ pmac-2.5/include/net/irda/irlmp.h	Sat Apr 27 15:18:05 2002
@@ -100,7 +100,7 @@
 	irda_queue_t queue;      /* Must be first */
 	magic_t magic;
 
-	int  connected;
+	unsigned long connected;	/* set_bit used on this */
 	int  persistent;
 
 	__u8 slsap_sel;   /* Source (this) LSAP address */
diff -urN linux-2.5/include/net/irda/irttp.h pmac-2.5/include/net/irda/irttp.h
--- linux-2.5/include/net/irda/irttp.h	Sat Apr 27 20:51:34 2002
+++ pmac-2.5/include/net/irda/irttp.h	Sat Apr 27 15:21:33 2002
@@ -102,7 +102,7 @@
 	__u32 tx_max_sdu_size; /* Max transmit user data size */
 
 	int close_pend;        /* Close, but disconnect_pend */
-	int disconnect_pend;   /* Disconnect, but still data to send */
+	unsigned long disconnect_pend; /* Disconnect, but still data to send */
 	struct sk_buff *disconnect_skb;
 };
 
diff -urN linux-2.5/net/irda/irnet/irnet.h pmac-2.5/net/irda/irnet/irnet.h
--- linux-2.5/net/irda/irnet/irnet.h	Sat Apr 27 20:52:03 2002
+++ pmac-2.5/net/irda/irnet/irnet.h	Sat Apr 27 15:23:57 2002
@@ -404,8 +404,8 @@
 
   /* ------------------------ IrTTP part ------------------------ */
   /* We create a pseudo "socket" over the IrDA tranport */
-  int			ttp_open;	/* Set when IrTTP is ready */
-  int			ttp_connect;	/* Set when IrTTP is connecting */
+  unsigned long		ttp_open;	/* Set when IrTTP is ready */
+  unsigned long		ttp_connect;	/* Set when IrTTP is connecting */
   struct tsap_cb *	tsap;		/* IrTTP instance (the connection) */
 
   char			rname[NICKNAME_MAX_LEN + 1];
diff -urN linux-2.5/net/irda/irnet/irnet_ppp.c pmac-2.5/net/irda/irnet/irnet_ppp.c
--- linux-2.5/net/irda/irnet/irnet_ppp.c	Sat Apr 27 20:52:04 2002
+++ pmac-2.5/net/irda/irnet/irnet_ppp.c	Sat Apr 27 15:25:07 2002
@@ -860,7 +860,7 @@
       irda_irnet_connect(self);
 #endif /* CONNECT_IN_SEND */
 
-      DEBUG(PPP_INFO, "IrTTP not ready ! (%d-%d)\n",
+      DEBUG(PPP_INFO, "IrTTP not ready ! (%ld-%ld)\n",
 	    self->ttp_open, self->ttp_connect);
 
       /* Note : we can either drop the packet or block the packet.

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

only message in thread, other threads:[~2002-04-27 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-27 12:16 set_bit takes a long in irda Paul Mackerras

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®