From: Paul Mackerras <paulus@samba.org>
To: jt@hpl.hp.com
Cc: linux-kernel@vger.kernel.org
Subject: set_bit takes a long in irda
Date: Sat, 27 Apr 2002 22:16:08 +1000 (EST) [thread overview]
Message-ID: <15562.38536.785666.690953@argo.ozlabs.ibm.com> (raw)
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.
reply other threads:[~2002-04-27 12:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15562.38536.785666.690953@argo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®