From: Richard Gooch <rgooch@ras.ucalgary.ca>
To: Per Niva <pna@mendosus.org>
Cc: <arjanv@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Added devfs support for i386 msr/cpuid driver
Date: Mon, 3 Sep 2001 13:57:38 -0600 [thread overview]
Message-ID: <200109031957.f83Jvc927318@vindaloo.ras.ucalgary.ca> (raw)
In-Reply-To: <Pine.LNX.4.33.0108271621410.22199-100000@subcentral.mendosus.org>
In-Reply-To: <200108271452.f7REqjT15752@vindaloo.ras.ucalgary.ca> <Pine.LNX.4.33.0108271621410.22199-100000@subcentral.mendosus.org>
Per Niva writes:
> On Mon, 27 Aug 2001, Richard Gooch wrote:
> > The reason it's wrong is because he put #ifdef's in there. The
> > functions should just be called unconditionally. The #ifdef's are in
> > the header.
>
> I actually pondered a while on this, and settled on
> the cut'n'paste-from-mtrr.c version. There is no error
> check there, and I just overlooked it.
>
> The defence for the #ifdefs is that I didn't see
> register_chrdev() being aware of devfs, and I thought
> we'd be better off just not calling register_chrdev()
> at all if we have devfs.
No, even if CONFIG_DEVFS_FS=y, doesn't mean the user wants to
mount/use devfs, so you shouldn't disable register_chrdev().
> It's not like I personally like #ifdefs, but it seemed
> justified to my inexperienced eyes at that point. And
> there's a #ifdef CONFIG_DEVFS_FS around the call in
> mtrr.c too, and I thought it safe to do like what's
> already in the official tree.
The #ifdef in mtrr.c is there for historical reasons (at one point,
neither the mtrr or devfs patches were in the kernel, but I wanted
mtrr to use devfs if available, hence the #ifdef). The #ifdef can be
safely taken out (and should be).
> In microcode.c however, is the new-style without #ifdef
> (or rather with the #ifdef in the headers instead)
> and with error checking, but microcode_init() doesn't
> use register_chrdev() anyway, even if devfs is not
> supported.
>
> Please enlighten me!
The microcode patch went in after devfs was in the kernel, IIRC, and
thus could unconditionally reference devfs_register().
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
prev parent reply other threads:[~2001-09-03 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-27 8:43 Per Niva
2001-08-27 11:16 ` Arjan van de Ven
2001-08-27 14:52 ` Richard Gooch
2001-08-27 14:55 ` Per Niva
2001-09-03 19:57 ` Richard Gooch [this message]
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=200109031957.f83Jvc927318@vindaloo.ras.ucalgary.ca \
--to=rgooch@ras.ucalgary.ca \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pna@mendosus.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®