Subject: Re: VM_CMD() vs VM_CMD2()
To: Bang Jun-Young <junyoung@NetBSD.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 08/23/2003 00:33:19
>Statistics:
>
>NEW_VMCMD: 125 matches in 20 files
>NEW_VMCMD2: 9 matches in 3 files.
>
>Two places where NEW_VMCMD2() are used are kern/exec_elf32.c and
>kern/exec_macho.c.

there used to be more consumers of NEW_VMCMD2(), but they got killed
when the stack setup routines were merged.

>But I still prefer a single macro for the following reasons:
>
> a) it's simpler
> b) changing 125 matches is a mechanical work and shouldn't be difficult
> c) my own project is also using NEW_VMCMD2().
>
>After all, it's just a matter of taste. :-)

NEW_VMCMD2() probably appeared when someone needed an additional
argument, but didn't want to cause piles of code churn simply to pass
0 in most places (like you're proposing, which would touch 20-23 files
almost needlessly).  i don't expect anyone would *strongly* object if
you were kill NEW_VMCMD(), but there's no guarantee that the same
thing won't happen again someplace else at a later point.

if i was you, i'd just leave it be.  it doesn't hurt all that much.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."