netdev
[Top] [All Lists]

Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfg

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com)
From: Mitchell Blank Jr <mitch@xxxxxxxxxx>
Date: Mon, 22 Sep 2003 21:45:11 -0700
Cc: chas williams <chas@xxxxxxxxxxxxxxxx>, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20030922190017.A27677@infradead.org>
References: <hch@infradead.org> <200309221755.h8MHt5kT010184@ginger.cmf.nrl.navy.mil> <20030922190017.A27677@infradead.org>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
Christoph Hellwig wrote (in two different emails):
> Umm, shouldn't you just ifdef out the whole function and it's
> assignment to the operations vector?  This looks horribly ugly..

Sorry for any ugliness - its my fault.  I personally don't think it really
makes a difference either way.  Its already #ifdef'ed the same way in 2.6.

> and
> third your (void)arg crap is ugly as hell. (what compiler do you have
> that complains about this, btw, gcc 3.3 doesn't..).

"gcc -Wunused-parameter"

It's true that the kernel doesn't compile with that option but I've gotten
in the habit of adding the "(void) x;" from working on other projects that
do.  I think it's pretty harmless.

> #if FOO
> foo_ioctl()
> {
> }
> #else
> #define foo_ioctl     NULL
> #endif

Yes, that would probably be (a bit) cleaner.  That's what we already
use for lanai_proc_read if !CONFIG_PROC_FS

-Mitch

<Prev in Thread] Current Thread [Next in Thread>