NetBSD Problem Report #7295
Received: (qmail 10398 invoked from network); 30 Mar 1999 18:55:19 -0000
Message-Id: <199903301851.UAA03299@rumolt.teuto.de>
Date: Tue, 30 Mar 1999 20:51:35 +0200 (MEST)
From: Martin Husemann <martin@rumolt.teuto.de>
Reply-To: martin@rumolt.teuto.de
To: gnats-bugs@gnats.netbsd.org
Subject: if_we frontend and backend double declare flags constants
X-Send-Pr-Version: 3.95
>Number: 7295
>Category: kern
>Synopsis: if_we frontend and dp8390 backend double declare flags constants
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 30 11:05:00 +0000 1999
>Closed-Date: Wed Jul 04 11:11:34 +0000 2001
>Last-Modified: Wed Jul 04 11:11:34 +0000 2001
>Originator: Martin Husemann
>Release: current as of Tue Mar 30 20:44:51 1999
>Organization:
>Environment:
System: NetBSD rumolt.teuto.de 1.3K NetBSD 1.3K (RUMOLT) #10: Tue Mar 23 06:41:45 MET 1999 root@rumolt.teuto.de:/a/usr/src/sys-i4b/arch/i386/compile/RUMOLT i386
>Description:
While looking for possible flags values for the sys/dev/isa/if_we.c driver,
I found the following:
in sys/dev/ic/dp8390var.h:
#define DP8390_DISABLE_TRANCEIVER 0x0001
#define DP8390_FORCE_8BIT_MODE 0x0002
#define DP8390_FORCE_16BIT_MODE 0x0004
#define DP8390_NO_MULTI_BUFFERING 0x0008
#define DP8390_FORCE_PIO 0x0010
in sys/dev/isa/if_wereg.h:
#define WE_FLAGS_DISABLE_TRANCEIVER 0x0001
#define WE_FLAGS_FORCE_8BIT_MODE 0x0002
#define WE_FLAGS_FORCE_16BIT_MODE 0x0004
#define WE_FLAGS_NO_MULTI_BUFFERING 0x0008
Code inspection shows that DP8390_DISABLE_TRANCEIVER and DP8390_FORCE_PIO are
not used in the driver at all; the NO_MULTI_BUFFERING is only used in the
backend as DP8390_NO_MULTI_BUFFERING, the FORCE_8/16 codes are only used in
the frontend as WE_FLAGS_FORCE_8/16BIT_MODE.
Wouldn't it be better to remove the unused constants and only define them
once (or separate them into frontend/backend values - but don't duplicate
them)?
>How-To-Repeat:
Code inspection.
>Fix:
GC and unify the duplicate defines.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Fri Jun 29 04:07:22 PDT 2001
Responsible-Changed-Why:
I'll take care of this.
State-Changed-From-To: open->closed
State-Changed-By: jdolecek
State-Changed-When: Wed Jul 4 04:11:13 PDT 2001
State-Changed-Why:
Fixed, thanks for report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.