Subject: machdep.c: #if NPC > 0, but not #include "pc.h"
To: None <port-sandpoint@netbsd.org, port-powerpc@netbsd.org>
From: Ben Harris <bjh21@NetBSD.org>
List: port-sandpoint
Date: 02/09/2004 17:37:30
While trying to clean up pckbc(4) and friends, I noticed that both
arch/evbppc/ev64260/machdep.c and arch/sandpoint/sandpoint/machdep.c
contain the following function:

int
pckbc_machdep_cnattach(pckbc_tag_t kbctag, pckbc_slot_t kbcslot)
{
#if (NPC > 0)
	return (pcconskbd_cnattach(kbctag, kbcslot));
#else
	return (ENXIO);
#endif
}

Neither file, though, #includes "pc.h", so I don't think the NPC will ever
be defined, so pcconskbd_cnattach() will never be called and
pckbc_machdep_cnattach() will always return ENXIO.  Am I right?  Is it OK
for me to simplify pckbc_machdep_cnattach() appropriately?

-- 
Ben Harris                                                   <bjh21@NetBSD.org>
Portmaster, NetBSD/acorn26           <URL:http://www.NetBSD.org/Ports/acorn26/>