From: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: Alan Cox <alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Cc: kyle-hoO6YkzgTuCM0SS3m2neIg@public.gmane.org,
bastian-yyjItF7Rl6lg9hUCZPvPmw@public.gmane.org,
hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org
Subject: Re: [RFC][PATCH 1/3] Move parts of init_dev() into new functions
Date: Mon, 25 Aug 2008 15:01:25 -0700 [thread overview]
Message-ID: <20080825220125.GA1084@us.ibm.com> (raw)
In-Reply-To: <20080825211146.70b4af63-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Alan Cox [alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org] wrote:
| On Mon, 25 Aug 2008 13:11:10 -0700
| sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org wrote:
|
| >
| > init_dev() is doing too many things all in one function, making it
| > harder to understand/extend. This and following two patches attempt
| > to simplify/cleanup the interface a bit.
| >
| > Only touch tested at this point. Appreciate any comments :-)
|
| Well this code is very much in flux so I really don't want to get further
| changes mixed up into the plan at the wrong moment. That said:
Ok. Do let me know if there are pieces I can help with.
|
| > +/*
| > + * find_tty() - find an existing tty, if any
| > + * @driver: the driver for the tty
| > + * @idx: the minor number
|
| This fits very well with where I want to end up - which is
|
|
| tty = driver->ops->something(driver, idx);
That looks like a good idea. With multiple pts instances, we would also
need an 'instance' parameter to uniquely identify the pty. Other tty
devices could set their 'instance' to NULL.
It could be a void *, although internally if it is the pts inode, we
could optimize devpts (as Peter Anvin pointed out).
By extension, maybe the tty layer would need another interface to determine
the instance:
instance = driver->ops->get_instance(driver, inode, other_stuff)
using this we find the tty
tty = driver->ops->something(driver, instance, idx);
next prev parent reply other threads:[~2008-08-25 22:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 20:11 [RFC][PATCH 1/3] Move parts of init_dev() into new functions sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080825201110.GA32440-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-25 20:11 ` Alan Cox
[not found] ` <20080825211146.70b4af63-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-08-25 22:01 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA [this message]
[not found] ` <20080825220125.GA1084-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-25 22:21 ` H. Peter Anvin
[not found] ` <48B33072.4080509-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-08-25 22:20 ` Alan Cox
[not found] ` <20080825232003.3574a181-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-08-26 0:02 ` H. Peter Anvin
[not found] ` <48B34818.2000400-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-08-26 9:44 ` Alan Cox
[not found] ` <20080826104445.06d36dd2-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-08-26 16:40 ` H. Peter Anvin
[not found] ` <48B431F4.90201-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-08-26 16:49 ` Alan Cox
[not found] ` <20080826174921.6bfbf989-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-08-26 17:40 ` H. Peter Anvin
2008-08-25 23:57 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080825235736.GA2959-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-26 0:04 ` H. Peter Anvin
[not found] ` <48B348A7.5020407-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-08-26 1:18 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080826011807.GB2959-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-26 2:13 ` H. Peter Anvin
2008-08-25 20:23 ` [RFC][PATCH 2/3] Move some init_dev() code to callers sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080825202314.GA318-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-28 20:17 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
2008-08-25 20:23 ` [RFC][PATCH 3/3] Rename and change init_dev() prototype sukadev-r/Jw6+rmf7HQT0dZR+AlfA
2008-08-26 11:09 ` [RFC][PATCH 1/3] Move parts of init_dev() into new functions Alan Cox
2008-08-28 20:25 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20080828202520.GG24075-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-28 21:00 ` Alan Cox
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=20080825220125.GA1084@us.ibm.com \
--to=sukadev-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
--cc=bastian-yyjItF7Rl6lg9hUCZPvPmw@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=kyle-hoO6YkzgTuCM0SS3m2neIg@public.gmane.org \
--cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.