From: Christoph Hellwig <hch@infradead.org>
To: Brent Casavant <bcasavan@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/2] external interrupts: abstraction layer
Date: Wed, 24 Aug 2005 08:38:56 +0100 [thread overview]
Message-ID: <20050824073856.GD24513@infradead.org> (raw)
In-Reply-To: <20050823153254.B5569@chenjesu.americas.sgi.com>
> > > +static int extint_counter_open(struct inode *inode, struct file *filp)
> > > +{
> > > + struct extint_device *ed = file_to_extint_device(filp);
> >
> > you don't need the file but just the inode (strictly speaking the cdev),
> > and doing this based on the file is rather confusing to the reader because
> > the struct file passed to ->open has just been allocated.
>
> Perhaps I'm not following something here.
>
> This behavior enables using poll/select to detect or wait for the
> external interrupt counter (which is per-device) to change. The
> "has changed" status must be on a per-open basis, not a per-device
> basis, as seperate processes may read the counter at different times.
Sorry, the whole behaviour is complety fine. I just don't thing the name
and calling convention of file_to_extint_device is optimal. It should
take an struct inode * and be called just to_extint_device or someting.
The above would become
struct extint_device *ed = to_extint_device(filp->f_dentry->d_inode);
next prev parent reply other threads:[~2005-08-24 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 21:55 [PATCH 1/2] external interrupts: abstraction layer Brent Casavant
2005-08-20 9:46 ` Christoph Hellwig
2005-08-23 22:01 ` Brent Casavant
2005-08-24 7:38 ` Christoph Hellwig [this message]
2005-08-24 15:00 ` Brent Casavant
-- strict thread matches above, loose matches on Subject: below --
2005-07-28 21:13 Brent Casavant
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=20050824073856.GD24513@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=bcasavan@sgi.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