From: Samuel Ortiz <samuel@sortiz.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel ML <linux-kernel@vger.kernel.org>,
Ryan Reading <ryanr23@gmail.com>
Subject: [PATCH -mm] IrCOMM discovery indication simplification
Date: Mon, 1 Oct 2007 02:29:51 +0300 [thread overview]
Message-ID: <20070930232951.GA18702@sortiz.org> (raw)
Hi Andrew,
Every IrCOMM socket is registered with the discovery subsystem, so we don't
need to loop over all of them for every discovery event. We just need to
do it for the registered IrCOMM socket.
Would you please consider this patch for -mm inclusion ?
From: Ryan Reading <ryanr23@gmail.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
---
net/irda/ircomm/ircomm_tty_attach.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
Index: net-2.6.24-quilt/net/irda/ircomm/ircomm_tty_attach.c
===================================================================
--- net-2.6.24-quilt.orig/net/irda/ircomm/ircomm_tty_attach.c 2007-10-01 01:53:56.000000000 +0300
+++ net-2.6.24-quilt/net/irda/ircomm/ircomm_tty_attach.c 2007-10-01 01:53:58.000000000 +0300
@@ -381,18 +381,9 @@
info.daddr = discovery->daddr;
info.saddr = discovery->saddr;
- /* FIXME. We have a locking problem on the hashbin here.
- * We probably need to use hashbin_find_next(), but we first
- * need to ensure that "line" is unique. - Jean II */
- self = (struct ircomm_tty_cb *) hashbin_get_first(ircomm_tty);
- while (self != NULL) {
- IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
-
- ircomm_tty_do_event(self, IRCOMM_TTY_DISCOVERY_INDICATION,
- NULL, &info);
-
- self = (struct ircomm_tty_cb *) hashbin_get_next(ircomm_tty);
- }
+ self = (struct ircomm_tty_cb *) priv;
+ ircomm_tty_do_event(self, IRCOMM_TTY_DISCOVERY_INDICATION,
+ NULL, &info);
}
/*
next reply other threads:[~2007-09-30 23:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 23:29 Samuel Ortiz [this message]
2007-10-03 21:23 ` [PATCH -mm] IrCOMM discovery indication simplification Andrew Morton
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=20070930232951.GA18702@sortiz.org \
--to=samuel@sortiz.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryanr23@gmail.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