From: "Romain Liévin" <rlievin@free.fr>
To: Christoph Hellwig <hch@ns.caldera.de>
Cc: Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: your mail (tipar)
Date: Thu, 14 Mar 2002 19:51:31 +0100 (MET) [thread overview]
Message-ID: <1016131891.3c90f13373d0a@imp.free.fr> (raw)
In-Reply-To: <200203132044.g2DKiba00923@ns.caldera.de>
In-Reply-To: <200203132044.g2DKiba00923@ns.caldera.de>
> > +static int tipar_open(struct inode *inode, struct file *file)
> > +{
> > + unsigned int minor = minor(inode->i_rdev) - TIPAR_MINOR_0;
> > +
> > + if (minor >= PP_NO)
> > + return -ENXIO;
> > +
> > + if(table[minor].opened)
> > + return -EBUSY;
> > +
> > + table[minor].opened++;
> > +
>
> I think <asm/bitops.h> operations on one unsigned long for all devices
> would be better, and at least non-racy.
Well, but I have never seen a such use in any kernrl modules. Is it the right
way to use ?
>
> > + case TIPAR_DELAY:
> > + delay = arg;
>
> Needs get_user/copy_from_user
In the modules tree, they use copy_to_user. They use the same construction
rather than using get_user. More informations ?
Romain
---
Romain Liévin (aka roms)
http://lpg.ticalc.org/prj_tilp, prj_usb, prj_tidev, prj_gtktiemu
mail: roms@lpg.ticalc.org
parent reply other threads:[~2002-03-14 18:51 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200203132044.g2DKiba00923@ns.caldera.de>]
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=1016131891.3c90f13373d0a@imp.free.fr \
--to=rlievin@free.fr \
--cc=hch@ns.caldera.de \
--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®