From: Christoph Hellwig <hch@infradead.org>
To: chas williams <chas@cmf.nrl.navy.mil>
Cc: Christoph Hellwig <hch@infradead.org>,
davem@redhat.com, netdev@oss.sgi.com
Subject: Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com)
Date: Mon, 22 Sep 2003 19:00:17 +0100 [thread overview]
Message-ID: <20030922190017.A27677@infradead.org> (raw)
In-Reply-To: <200309221755.h8MHt5kT010184@ginger.cmf.nrl.navy.mil>; from chas@cmf.nrl.navy.mil on Mon, Sep 22, 2003 at 01:55:07PM -0400
On Mon, Sep 22, 2003 at 01:55:07PM -0400, chas williams wrote:
> In message <20030922180749.A26432@infradead.org>,Christoph Hellwig writes:
> >Umm, shouldn't you just ifdef out the whole function and it's
> >assignment to the operations vector? This looks horribly ugly..
>
> i suppose i am not convinced that two #ifdef/#endif's are better than an
> #if/#else/#endif
first ifdefs in a function are always worse than around functions,
second ifdefs in a function that make it a stuv are pretty ugly 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..).
So if you prefer one if/else/endif you can do it as
#if FOO
foo_ioctl()
{
}
#else
#define foo_ioctl NULL
#endif
but in the case of assigning a function pointer to an operation vector
I find this more confusing than the above variant.
---end quoted text---
next prev parent reply other threads:[~2003-09-22 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-22 17:03 [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com) chas williams
2003-09-22 17:07 ` Christoph Hellwig
2003-09-22 17:55 ` chas williams
2003-09-22 18:00 ` Christoph Hellwig [this message]
2003-09-23 4:45 ` Mitchell Blank Jr
2003-09-23 10:57 ` David S. Miller
2003-09-23 11:42 ` chas williams
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=20030922190017.A27677@infradead.org \
--to=hch@infradead.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).