LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Johannes Weiner <hannes-kernel@saeurebad.de>
To: Wink Saville <wink@saville.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] Initial implementation of the trec driver and include files
Date: Wed, 21 Mar 2007 19:17:40 +0100 [thread overview]
Message-ID: <20070321181739.GC16768@leiferikson> (raw)
In-Reply-To: <46016208.3040303@saville.com>
Hi,
On Wed, Mar 21, 2007 at 09:49:12AM -0700, Wink Saville wrote:
> >>Please don't use camel-case - in general.
> >>
> Would p_next, p_cur and p_end be OK?
I think it's generally disliked. Quoting Documentation/CodingStyle:
``Encoding the type of a function into the name (so-called Hungarian
notation) is brain damaged - the compiler knows the types anyway and can
check those, and it only confuses the programmer. No wonder MicroSoft
makes buggy programs.''
> >>--- /dev/null
> >>+++ b/include/linux/trec.h
> >>@@ -0,0 +1,34 @@
> >>+/*
> >>+#define TREC0() trec_write(TREC_PC_ADDR, TREC_PID,
> >>0, 0)
> >>
> [...]
> >>+
> >>+#define ZREC0() do { } while (0)
> >>
> >Why not seperate them by an #ifndef? So you don't have to replace TREC?
> >with ZREC? but rather change one #define knob.
>
> The reason is to allow the user easily change individual TREC's from
> active to inactive by just
> changing a single character. Eventually I envision adding runtime
> support for changing if a
> particular set of TREC's are active or not, but this was simple.
You can implement a sysctl-setting to enable/disable the whole system
(which then would be runtime changeable).
=Hannes
next prev parent reply other threads:[~2007-03-21 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 6:47 Wink Saville
2007-03-21 8:22 ` Johannes Weiner
2007-03-21 8:37 ` Johannes Weiner
2007-03-21 16:49 ` Wink Saville
2007-03-21 18:17 ` Johannes Weiner [this message]
2007-03-22 4:59 ` Wink Saville
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=20070321181739.GC16768@leiferikson \
--to=hannes-kernel@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=wink@saville.com \
--subject='Re: [PATCH 2/7] Initial implementation of the trec driver and include files' \
/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
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).