From: Stephen Hemminger <shemminger@osdl.org>
To: Jean Tourrilhes <jt@hpl.hp.com>
Cc: irda-users@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [PATCH] (1/5) get rid of useless hashbin in irtty
Date: Fri, 15 Aug 2003 15:46:08 -0700 [thread overview]
Message-ID: <20030815154608.56cf0551.shemminger@osdl.org> (raw)
Working on converting IRDA to new netdevice semantics, this is the first
of some of the small things I found.
The irtty hashbin is created, maintained and never used.
Motivation for removing is that the hashbin locking has problems with
the locking assumptions in on network device removal.
diff -Nru a/drivers/net/irda/irtty.c b/drivers/net/irda/irtty.c
--- a/drivers/net/irda/irtty.c Fri Aug 15 11:46:11 2003
+++ b/drivers/net/irda/irtty.c Fri Aug 15 11:46:11 2003
@@ -39,7 +39,6 @@
#include <net/irda/wrapper.h>
#include <net/irda/irda_device.h>
-static hashbin_t *irtty = NULL;
static struct tty_ldisc irda_ldisc;
static int qos_mtt_bits = 0x03; /* 5 ms or more */
@@ -75,14 +74,6 @@
{
int status;
- /* Probably no need to lock here because all operations done in
- * open()/close() which are already safe - Jean II */
- irtty = hashbin_new( HB_NOLOCK);
- if ( irtty == NULL) {
- printk( KERN_WARNING "IrDA: Can't allocate irtty hashbin!\n");
- return -ENOMEM;
- }
-
/* Fill in our line protocol discipline, and register it */
memset(&irda_ldisc, 0, sizeof( irda_ldisc));
@@ -124,12 +115,6 @@
__FUNCTION__, ret);
}
- /*
- * The TTY should care of deallocating the instances by using the
- * callback to irtty_close(), therefore we do give any deallocation
- * function to hashbin_destroy().
- */
- hashbin_delete(irtty, NULL);
}
/*
@@ -172,8 +157,6 @@
/* Give self a name */
strcpy(name, tty->name);
- hashbin_insert(irtty, (irda_queue_t *) self, (int) self, NULL);
-
if (tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
@@ -285,8 +268,6 @@
if (self->netdev)
unregister_netdev(self->netdev);
- self = hashbin_remove(irtty, (int) self, NULL);
-
/* Protect access to self->task and self->?x_buff - Jean II */
spin_lock_irqsave(&self->lock, flags);
diff -Nru a/include/net/irda/irtty.h b/include/net/irda/irtty.h
--- a/include/net/irda/irtty.h Fri Aug 15 11:46:11 2003
+++ b/include/net/irda/irtty.h Fri Aug 15 11:46:11 2003
@@ -31,7 +31,6 @@
#include <linux/netdevice.h>
#include <net/irda/irda.h>
-#include <net/irda/irqueue.h>
#include <net/irda/irda_device.h>
/* Used by ioctl */
@@ -45,7 +44,6 @@
#define IRTTY_IOC_MAXNR 2
struct irtty_cb {
- irda_queue_t q; /* Must be first */
magic_t magic;
struct net_device *netdev; /* Yes! we are some kind of netdevice */
next reply other threads:[~2003-08-15 22:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-15 22:46 Stephen Hemminger [this message]
2003-08-15 23:05 ` [PATCH] (1/5) get rid of useless hashbin in irtty Jean Tourrilhes
2003-08-16 12:20 ` David S. Miller
2003-08-17 0:14 ` Jean Tourrilhes
2003-08-17 0:58 ` David S. Miller
2003-08-17 1:11 ` Jean Tourrilhes
2003-08-17 1:09 ` David S. Miller
2003-08-17 1:36 ` Jean Tourrilhes
2003-08-18 16:03 ` Stephen Hemminger
2003-08-18 16:50 ` Jean Tourrilhes
2003-08-18 16:53 ` Jeff Garzik
2003-08-18 17:08 ` Jean Tourrilhes
2003-08-19 0:07 ` Jeff Garzik
2003-08-19 22:58 ` [PATCH] kill old irtty Stephen Hemminger
2003-08-20 4:02 ` David S. Miller
[not found] ` <Pine.LNX.4.44.0308171335050.1409-100000@notebook.home.mdiehl.de>
2003-08-18 5:18 ` [PATCH] (1/5) get rid of useless hashbin in irtty David S. Miller
[not found] ` <Pine.LNX.4.44.0308180959150.3006-100000@notebook.home.mdiehl.de>
2003-08-18 9:21 ` David S. Miller
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=20030815154608.56cf0551.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=irda-users@lists.sourceforge.net \
--cc=jt@hpl.hp.com \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).