CVS commit: src/share/misc
Module Name:src Committed By: ryoon Date: Tue Mar 13 10:32:59 UTC 2012 Modified Files: src/share/misc: bsd-family-tree Log Message: * Sync with FreeBSD: src/share/misc/bsd-family-tree,v rev. 1.151 Add DragonFly 3.0.1. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/share/misc/bsd-family-tree Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/bsd-family-tree diff -u src/share/misc/bsd-family-tree:1.43 src/share/misc/bsd-family-tree:1.44 --- src/share/misc/bsd-family-tree:1.43 Fri Jan 27 14:34:30 2012 +++ src/share/misc/bsd-family-tree Tue Mar 13 10:32:58 2012 @@ -251,7 +251,7 @@ FreeBSD 5.2 | | | 10.7| | | || | OpenBSD 5.0 | +--FreeBSD | | | | - |9.0 | | | | + |9.0 | | | DragonFly 3.0.1 | v | | | | || | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | @@ -543,6 +543,7 @@ OpenBSD 4.9 2011-05-01 [OBD] Mac OS X 10.7 2011-07-20 [APL] OpenBSD 5.0 2011-11-01 [OBD] FreeBSD 9.0 2012-01-12 [FBD] +DragonFly 3.0.1 2012-02-21 [DFB] Bibliography @@ -603,4 +604,4 @@ Steven M. Schultz for providing 2.8BSD, Copyright (c) 1997-2012 Wolfram Schneider URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree -$FreeBSD: src/share/misc/bsd-family-tree,v 1.150 2012/01/13 06:18:23 maxim Exp $ +$FreeBSD: src/share/misc/bsd-family-tree,v 1.151 2012/02/22 17:52:53 maxim Exp $
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Mar 13 17:12:30 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: mkmodules.c Log Message: Entries to the file contents need to be NULL terminated. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/mkmodules.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/mkmodules.c diff -u src/external/gpl2/xcvs/dist/src/mkmodules.c:1.5 src/external/gpl2/xcvs/dist/src/mkmodules.c:1.6 --- src/external/gpl2/xcvs/dist/src/mkmodules.c:1.5 Thu Mar 8 15:45:28 2012 +++ src/external/gpl2/xcvs/dist/src/mkmodules.c Tue Mar 13 13:12:30 2012 @@ -99,6 +99,7 @@ static const char *const access_contents }; static const char *const group_contents[] = { + NULL }; /* Structure which describes an administrative file. */
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: macallan Date: Tue Mar 13 17:26:05 UTC 2012 Modified Files: src/sys/arch/macppc/macppc: machdep.c Log Message: we don't need malloc.h here To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/arch/macppc/macppc/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/macppc/machdep.c diff -u src/sys/arch/macppc/macppc/machdep.c:1.162 src/sys/arch/macppc/macppc/machdep.c:1.163 --- src/sys/arch/macppc/macppc/machdep.c:1.162 Thu Jul 28 15:29:52 2011 +++ src/sys/arch/macppc/macppc/machdep.c Tue Mar 13 17:26:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.162 2011/07/28 15:29:52 macallan Exp $ */ +/* $NetBSD: machdep.c,v 1.163 2012/03/13 17:26:05 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.162 2011/07/28 15:29:52 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.163 2012/03/13 17:26:05 macallan Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include -#include #include #include #include
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: macallan Date: Tue Mar 13 18:24:54 UTC 2012 Modified Files: src/sys/arch/macppc/macppc: pic_heathrow.c pic_ohare.c Log Message: malloc() -> kmem_alloc() To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/macppc/pic_heathrow.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/macppc/pic_ohare.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/macppc/pic_heathrow.c diff -u src/sys/arch/macppc/macppc/pic_heathrow.c:1.7 src/sys/arch/macppc/macppc/pic_heathrow.c:1.8 --- src/sys/arch/macppc/macppc/pic_heathrow.c:1.7 Thu Jul 7 01:26:37 2011 +++ src/sys/arch/macppc/macppc/pic_heathrow.c Tue Mar 13 18:24:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_heathrow.c,v 1.7 2011/07/07 01:26:37 mrg Exp $ */ +/* $NetBSD: pic_heathrow.c,v 1.8 2012/03/13 18:24:54 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,12 +27,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pic_heathrow.c,v 1.7 2011/07/07 01:26:37 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_heathrow.c,v 1.8 2012/03/13 18:24:54 macallan Exp $"); #include "opt_interrupt.h" #include -#include +#include #include #include @@ -108,7 +108,7 @@ setup_heathrow(uint32_t addr) struct heathrow_ops *heathrow; struct pic_ops *pic; - heathrow = malloc(sizeof(struct heathrow_ops), M_DEVBUF, M_NOWAIT); + heathrow = kmem_alloc(sizeof(struct heathrow_ops), KM_SLEEP); KASSERT(heathrow != NULL); pic = &heathrow->pic; Index: src/sys/arch/macppc/macppc/pic_ohare.c diff -u src/sys/arch/macppc/macppc/pic_ohare.c:1.10 src/sys/arch/macppc/macppc/pic_ohare.c:1.11 --- src/sys/arch/macppc/macppc/pic_ohare.c:1.10 Thu Jul 7 01:26:37 2011 +++ src/sys/arch/macppc/macppc/pic_ohare.c Tue Mar 13 18:24:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_ohare.c,v 1.10 2011/07/07 01:26:37 mrg Exp $ */ +/* $NetBSD: pic_ohare.c,v 1.11 2012/03/13 18:24:54 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,12 +27,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pic_ohare.c,v 1.10 2011/07/07 01:26:37 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_ohare.c,v 1.11 2012/03/13 18:24:54 macallan Exp $"); #include "opt_interrupt.h" #include -#include +#include #include #include @@ -118,7 +118,7 @@ setup_ohare(uint32_t addr, int is_gc) struct pic_ops *pic; int i; - ohare = malloc(sizeof(struct ohare_ops), M_DEVBUF, M_NOWAIT); + ohare = kmem_alloc(sizeof(struct ohare_ops), KM_SLEEP); KASSERT(ohare != NULL); pic = &ohare->pic; @@ -238,6 +238,7 @@ ohare_get_irq(struct pic_ops *pic, int m bit = 31 - __builtin_clz(ohare->pending_events); mask = 1 << bit; + if ((ohare->pending_events & ~mask) == 0) { ohare->pending_events = 0; @@ -265,8 +266,14 @@ ohare_get_irq(struct pic_ops *pic, int m evt = ohare->pending_events & ohare->irqs[lvl]; if (evt == 0) { +#ifdef OHARE_DEBUG aprint_verbose("%s: spurious interrupt\n", ohare->pic.pic_name); + printf("levels: %08x\n", in32rb(INT_LEVEL_REG)); + printf("states: %08x\n", in32rb(INT_STATE_REG)); + printf("enable: %08x\n", in32rb(INT_ENABLE_REG)); + printf("events: %08x\n", ohare->pending_events); +#endif evt = ohare->pending_events; }
CVS commit: src/sys/kern
Module Name:src Committed By: elad Date: Tue Mar 13 18:36:49 UTC 2012 Modified Files: src/sys/kern: kern_auth.c Log Message: Remove TNF license. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/kern/kern_auth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_auth.c diff -u src/sys/kern/kern_auth.c:1.66 src/sys/kern/kern_auth.c:1.67 --- src/sys/kern/kern_auth.c:1.66 Sun Dec 4 19:24:58 2011 +++ src/sys/kern/kern_auth.c Tue Mar 13 18:36:49 2012 @@ -1,30 +1,4 @@ -/* $NetBSD: kern_auth.c,v 1.66 2011/12/04 19:24:58 jym Exp $ */ - -/*- - * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ +/* $NetBSD: kern_auth.c,v 1.67 2012/03/13 18:36:49 elad Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat @@ -54,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.66 2011/12/04 19:24:58 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.67 2012/03/13 18:36:49 elad Exp $"); #include #include
CVS commit: src/sys/sys
Module Name:src Committed By: elad Date: Tue Mar 13 18:50:42 UTC 2012 Modified Files: src/sys/sys: param.h Log Message: 6.99.4 To generate a diff of this commit: cvs rdiff -u -r1.411 -r1.412 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.411 src/sys/sys/param.h:1.412 --- src/sys/sys/param.h:1.411 Sun Feb 19 21:06:58 2012 +++ src/sys/sys/param.h Tue Mar 13 18:50:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.411 2012/02/19 21:06:58 rmind Exp $ */ +/* $NetBSD: param.h,v 1.412 2012/03/13 18:50:41 elad Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 699000300 /* NetBSD 6.99.3 */ +#define __NetBSD_Version__ 699000400 /* NetBSD 6.99.4 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/share/man/man4
Module Name:src Committed By: njoly Date: Tue Mar 13 19:25:43 UTC 2012 Modified Files: src/share/man/man4: adv.4 ath.4 aubtfwl.4 azalia.4 bwi.4 cs.4 de.4 drm.4 ef.4 elmc.4 epic.4 esp.4 ex.4 fmv.4 hdaudio.4 hifn.4 iavc.4 iha.4 inet6.4 iop.4 isdncapi.4 ixg.4 lmc.4 mii.4 multicast.4 options.4 otus.4 pcic.4 pcmcia.4 pcscp.4 pcweasel.4 pim.4 ral.4 rum.4 strip.4 trm.4 upgt.4 urio.4 uslsa.4 video.4 src/share/man/man4/man4.hp700: cpu.4 intro.4 io.4 src/share/man/man4/man4.sparc: openprom.4 Log Message: Use Lk macro instead of Pa when dealing with URLs, to produce links with HTML output. And while here update or removed some dead URL links. Another part of PR/29238. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/adv.4 src/share/man/man4/bwi.4 \ src/share/man/man4/fmv.4 src/share/man/man4/ral.4 \ src/share/man/man4/urio.4 cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/ath.4 cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/aubtfwl.4 cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/azalia.4 src/share/man/man4/ef.4 \ src/share/man/man4/hdaudio.4 src/share/man/man4/hifn.4 \ src/share/man/man4/pcic.4 src/share/man/man4/trm.4 \ src/share/man/man4/uslsa.4 cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/cs.4 src/share/man/man4/video.4 cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/de.4 src/share/man/man4/elmc.4 \ src/share/man/man4/pcscp.4 cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/drm.4 src/share/man/man4/esp.4 cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/epic.4 \ src/share/man/man4/multicast.4 src/share/man/man4/pcweasel.4 \ src/share/man/man4/rum.4 cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/ex.4 src/share/man/man4/lmc.4 cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/iavc.4 \ src/share/man/man4/isdncapi.4 src/share/man/man4/ixg.4 cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/iha.4 src/share/man/man4/pim.4 cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/inet6.4 cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/iop.4 cvs rdiff -u -r1.24 -r1.25 src/share/man/man4/mii.4 cvs rdiff -u -r1.412 -r1.413 src/share/man/man4/options.4 cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/otus.4 src/share/man/man4/upgt.4 cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/pcmcia.4 cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/strip.4 cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/man4.hp700/cpu.4 cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/man4.hp700/intro.4 cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.hp700/io.4 cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/man4.sparc/openprom.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/adv.4 diff -u src/share/man/man4/adv.4:1.8 src/share/man/man4/adv.4:1.9 --- src/share/man/man4/adv.4:1.8 Wed Apr 30 13:10:53 2008 +++ src/share/man/man4/adv.4 Tue Mar 13 19:25:39 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: adv.4,v 1.8 2008/04/30 13:10:53 martin Exp $ +.\" $NetBSD: adv.4,v 1.9 2012/03/13 19:25:39 njoly Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -148,10 +148,6 @@ Dual Channel Bus-Master VL (240 CDB Per .Xr scsi 4 , .Xr sd 4 , .Xr st 4 -.Pp -.Pa http://www.connectcom.net/ -.Pp -.Pa http://www.siig.com/ .Sh HISTORY The .Nm Index: src/share/man/man4/bwi.4 diff -u src/share/man/man4/bwi.4:1.8 src/share/man/man4/bwi.4:1.9 --- src/share/man/man4/bwi.4:1.8 Thu Oct 13 11:12:05 2011 +++ src/share/man/man4/bwi.4 Tue Mar 13 19:25:39 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: bwi.4,v 1.8 2011/10/13 11:12:05 njoly Exp $ +.\" $NetBSD: bwi.4,v 1.9 2012/03/13 19:25:39 njoly Exp $ .\" .\" Copyright (c) 2007 The DragonFly Project. All rights reserved. .\" @@ -85,7 +85,7 @@ The firmware for the adapter is not ship and must be obtained separately. An archive with firmware files that are known to work can be found at: .Bd -literal -offset indent -http://leaf.dragonflybsd.org/~sephe/bwi/v3.tbz +.Lk http://leaf.dragonflybsd.org/~sephe/bwi/v3.tbz .Ed .Pp The firmware files conventionally reside in @@ -124,7 +124,7 @@ by .An Taylor R. Campbell Aq campb...@mumble.net . .Pp The hardware specification was reverse engineered by the people at -.Pa http://bcm-specs.sipsolutions.net . +.Lk http://bcm-specs.sipsolutions.net . Thanks go also to johill and mb on the #bcm-specs channel. .Sh BUGS BCM4306 and BCM4309 chips do not work properly on channel 1, 2, and 3. Index: src/share/man/man4/fmv.4 diff -u src/share/man/man4/fmv.4:1.8 src/share/man/man4/fmv.4:1.9 --- src/share/man/man4/fmv.4:1.8 Wed Apr 30 13:10:54 2008 +++ src/share/man/man4/fmv.4 Tue Mar 13 19:25:40 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: fmv.4,v 1.8 2008/04/30 13:10:54 martin Exp $ +.\" $NetBSD: fmv.4,v 1.9 2012/03/13 19:25:40 njoly Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -67,7 +67,7 @@ driver. .Xr mbe 4 , .Xr ifconfig 8 .Pp -.Pa http://w
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Tue Mar 13 21:00:32 UTC 2012 Modified Files: src/libexec/ld.elf_so: rtld.c rtld.h Log Message: Mark _rtld_debug_state as not to be inlined. Add an explicit instruction barrier to prevent removal of calls to it. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.108 -r1.109 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.156 src/libexec/ld.elf_so/rtld.c:1.157 --- src/libexec/ld.elf_so/rtld.c:1.156 Thu Feb 16 23:00:39 2012 +++ src/libexec/ld.elf_so/rtld.c Tue Mar 13 21:00:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.156 2012/02/16 23:00:39 joerg Exp $ */ +/* $NetBSD: rtld.c,v 1.157 2012/03/13 21:00:31 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.156 2012/02/16 23:00:39 joerg Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.157 2012/03/13 21:00:31 joerg Exp $"); #endif /* not lint */ #include @@ -1385,7 +1385,8 @@ void _rtld_debug_state(void) { - /* do nothing */ + /* Prevent optimizer from removing calls to this function */ + __insn_barrier(); } void Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.108 src/libexec/ld.elf_so/rtld.h:1.109 --- src/libexec/ld.elf_so/rtld.h:1.108 Thu Feb 16 23:00:39 2012 +++ src/libexec/ld.elf_so/rtld.h Tue Mar 13 21:00:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.108 2012/02/16 23:00:39 joerg Exp $ */ +/* $NetBSD: rtld.h,v 1.109 2012/03/13 21:00:32 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -338,7 +338,7 @@ void _rtld_error(const char *, ...) __attribute__((__format__(__printf__,1,2))); void _rtld_die(void) __attribute__((__noreturn__)); void *_rtld_objmain_sym(const char *); -__dso_public void _rtld_debug_state(void); +__dso_public void _rtld_debug_state(void) __noinline; void _rtld_linkmap_add(Obj_Entry *); void _rtld_linkmap_delete(Obj_Entry *); void _rtld_objlist_push_head(Objlist *, Obj_Entry *);
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Tue Mar 13 21:07:28 UTC 2012 Modified Files: src/sys/sys: cdefs.h Log Message: Type macros providing min and max values for the given type, plus one that returns if a value can be represented in a given type. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.92 src/sys/sys/cdefs.h:1.93 --- src/sys/sys/cdefs.h:1.92 Wed Feb 22 12:52:58 2012 +++ src/sys/sys/cdefs.h Tue Mar 13 17:07:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.92 2012/02/22 17:52:58 martin Exp $ */ +/* $NetBSD: cdefs.h,v 1.93 2012/03/13 21:07:28 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -530,4 +530,32 @@ #define __CAST(__dt, __st) ((__dt)(__st)) #endif +#define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \ +(~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL) + +static inline long long __zero(void) { return 0; } +static __inline int __negative(double x) { return x < 0; } + +#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1 +#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1 +#define __type_min_u(t) ((t)0ULL) +#define __type_max_u(t) ((t)~0ULL) +#define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1) +#define __type_min(t) (__type_is_signed(t) ? __type_min_s(t) : __type_min_u(t)) +#define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t)) + + +#define __type_fit_u(t, a) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \ +(((a) & __type_mask(t)) == 0) : !__negative(a)) + +#define __type_fit_s(t, a) (/*LINTED*/__negative(a) ? \ +((intmax_t)((a) + __zero()) >= (intmax_t)__type_min_s(t)) : \ +((intmax_t)((a) + __zero()) <= (intmax_t)__type_max_s(t))) + +/* + * return true if value 'a' fits in type 't' + */ +#define __type_fit(t, a) (__type_is_signed(t) ? \ +__type_fit_s(t, a) : __type_fit_u(t, a)) + #endif /* !_SYS_CDEFS_H_ */
CVS commit: src/include
Module Name:src Committed By: christos Date: Tue Mar 13 21:14:55 UTC 2012 Modified Files: src/include: db.h Log Message: use __type_fit() instead of locally brewed macro To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/include/db.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/db.h diff -u src/include/db.h:1.24 src/include/db.h:1.25 --- src/include/db.h:1.24 Tue Aug 26 17:18:38 2008 +++ src/include/db.h Tue Mar 13 17:14:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: db.h,v 1.24 2008/08/26 21:18:38 joerg Exp $ */ +/* $NetBSD: db.h,v 1.25 2012/03/13 21:14:55 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -214,8 +214,7 @@ DB *dbopen(const char *, int, mode_t, DB #ifdef __DBINTERFACE_PRIVATE -#define _DBMASK(a) (~((1ULL << (sizeof(a) * NBBY)) - 1)) -#define _DBFIT(a, t) _DIAGASSERT(((a) & _DBMASK(t)) == 0) +#define _DBFIT(a, t) _DIAGASSERT(__type_fit(t, a)) DB *__bt_open(const char *, int, mode_t, const BTREEINFO *, int); DB *__hash_open(const char *, int, mode_t, const HASHINFO *, int);
CVS commit: src/lib/libc/cdb
Module Name:src Committed By: joerg Date: Tue Mar 13 21:32:12 UTC 2012 Modified Files: src/lib/libc/cdb: cdbw.c Log Message: Revert bloat. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/cdb/cdbw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/cdb/cdbw.c diff -u src/lib/libc/cdb/cdbw.c:1.2 src/lib/libc/cdb/cdbw.c:1.3 --- src/lib/libc/cdb/cdbw.c:1.2 Tue Mar 13 21:13:31 2012 +++ src/lib/libc/cdb/cdbw.c Tue Mar 13 21:32:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cdbw.c,v 1.2 2012/03/13 21:13:31 christos Exp $ */ +/* $NetBSD: cdbw.c,v 1.3 2012/03/13 21:32:12 joerg Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,13 +36,12 @@ #endif #include -__RCSID("$NetBSD: cdbw.c,v 1.2 2012/03/13 21:13:31 christos Exp $"); +__RCSID("$NetBSD: cdbw.c,v 1.3 2012/03/13 21:32:12 joerg Exp $"); #include "namespace.h" #include #include -#include #include #include #include @@ -168,8 +167,7 @@ cdbw_put_data(struct cdbw *cdbw, const v memcpy(cdbw->data_ptr[cdbw->data_counter], data, datalen); cdbw->data_len[cdbw->data_counter] = datalen; cdbw->data_size += datalen; - _DIAGASSERT(__type_fit(uint32_t, cdbw->data_counter)); - *idx = (uint32_t)cdbw->data_counter++; + *idx = cdbw->data_counter++; return 0; } @@ -332,9 +330,7 @@ remove_vertex(struct state *state, struc return; } - ptrdiff_t td = e - state->edges; - _DIAGASSERT(__type_fit(uint32_t, td)); - state->output_order[--state->output_index] = (uint32_t)td; + state->output_order[--state->output_index] = e - state->edges; vl = &state->verts[e->left]; vm = &state->verts[e->middle]; @@ -369,7 +365,8 @@ build_graph(struct cdbw *cdbw, struct st struct key_hash *key_hash; struct vertex *v; struct edge *e; - uint32_t hashes[3], i; + uint32_t hashes[3]; + size_t i; e = state->edges; for (i = 0; i < cdbw->hash_size; ++i) { @@ -495,10 +492,8 @@ print_hash(struct cdbw *cdbw, struct sta memcpy(buf, "NBCDB\n\0", 7); buf[7] = 1; strncpy((char *)buf + 8, descr, 16); - _DIAGASSERT(__type_fit(uint32_t, cdbw->data_size)); - le32enc(buf + 24, (uint32_t)cdbw->data_size); - _DIAGASSERT(__type_fit(uint32_t, cdbw->data_counter)); - le32enc(buf + 28, (uint32_t)cdbw->data_counter); + le32enc(buf + 24, cdbw->data_size); + le32enc(buf + 28, cdbw->data_counter); le32enc(buf + 32, state->entries); le32enc(buf + 36, state->seed); cur_pos = 40; @@ -509,8 +504,7 @@ print_hash(struct cdbw *cdbw, struct sta le32enc(buf + cur_pos, state->g[i]); cur_pos += size; } - _DIAGASSERT(__type_fit(uint32_t, cdbw->data_counter)); - size2 = compute_size((uint32_t)cdbw->data_size); + size2 = compute_size(cdbw->data_size); size = size * state->entries % size2; if (size != 0) { size = size2 - size; @@ -522,9 +516,7 @@ print_hash(struct cdbw *cdbw, struct sta COND_FLUSH_BUFFER(4); le32enc(buf + cur_pos, data_size); cur_pos += size2; - _DIAGASSERT(__type_fit(uint32_t, - data_size + cdbw->data_len[i])); - data_size += (uint32_t)cdbw->data_len[i]; + data_size += cdbw->data_len[i]; } COND_FLUSH_BUFFER(4); le32enc(buf + cur_pos, data_size); @@ -569,10 +561,8 @@ cdbw_output(struct cdbw *cdbw, int fd, c rv = 0; - _DIAGASSERT(__type_fit(uint32_t, cdbw->key_counter)); - state.keys = (uint32_t)cdbw->key_counter; - _DIAGASSERT(__type_fit(uint32_t, cdbw->key_counter)); - state.data_entries = (uint32_t)cdbw->data_counter; + state.keys = cdbw->key_counter; + state.data_entries = cdbw->data_counter; state.entries = state.keys + (state.keys + 3) / 4; if (state.entries < 10) state.entries = 10;
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Tue Mar 13 22:12:40 UTC 2012 Modified Files: src/lib/libc: Makefile.inc Log Message: Disable -w again until the complains are resolved. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/Makefile.inc diff -u src/lib/libc/Makefile.inc:1.9 src/lib/libc/Makefile.inc:1.10 --- src/lib/libc/Makefile.inc:1.9 Tue Mar 13 21:13:30 2012 +++ src/lib/libc/Makefile.inc Tue Mar 13 22:12:40 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2012/03/13 21:13:30 christos Exp $ +# $NetBSD: Makefile.inc,v 1.10 2012/03/13 22:12:40 joerg Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -25,6 +25,7 @@ USE_SHLIBDIR= yes WARNS=4 CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC +CWARNFLAGS+= -Wno-constant-conversion .if (${USE_HESIOD} != "no") CPPFLAGS+= -DHESIOD @@ -41,7 +42,7 @@ CPPFLAGS+= -DYP .endif # Set lint to exit on warnings -LINTFLAGS+= -w +#LINTFLAGS+= -w # ignore 'empty translation unit' warnings. LINTFLAGS+= -X 272
CVS commit: src/lib/libc/compat/sys
Module Name:src Committed By: joerg Date: Tue Mar 13 22:24:48 UTC 2012 Modified Files: src/lib/libc/compat/sys: compat_getdents.c Log Message: Add missing includes. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/compat/sys/compat_getdents.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compat/sys/compat_getdents.c diff -u src/lib/libc/compat/sys/compat_getdents.c:1.5 src/lib/libc/compat/sys/compat_getdents.c:1.6 --- src/lib/libc/compat/sys/compat_getdents.c:1.5 Tue Mar 13 21:13:32 2012 +++ src/lib/libc/compat/sys/compat_getdents.c Tue Mar 13 22:24:48 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_getdents.c,v 1.5 2012/03/13 21:13:32 christos Exp $ */ +/* $NetBSD: compat_getdents.c,v 1.6 2012/03/13 22:24:48 joerg Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -31,14 +31,16 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: compat_getdents.c,v 1.5 2012/03/13 21:13:32 christos Exp $"); +__RCSID("$NetBSD: compat_getdents.c,v 1.6 2012/03/13 22:24:48 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #define __LIBC12_SOURCE__ #include "namespace.h" #include +#include #include +#include #include #include
CVS commit: src/lib/libc
Module Name:src Committed By: joerg Date: Tue Mar 13 22:37:51 UTC 2012 Modified Files: src/lib/libc: Makefile.inc src/lib/libc/compat/gen: compat___fts13.c compat___fts30.c compat_fts.c Log Message: Fix all the issues lint is too dumb to warn about and re-enable -Wconstant-conversion. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/lib/libc/compat/gen/compat___fts13.c cvs rdiff -u -r1.4 -r1.5 src/lib/libc/compat/gen/compat___fts30.c \ src/lib/libc/compat/gen/compat_fts.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/Makefile.inc diff -u src/lib/libc/Makefile.inc:1.10 src/lib/libc/Makefile.inc:1.11 --- src/lib/libc/Makefile.inc:1.10 Tue Mar 13 22:12:40 2012 +++ src/lib/libc/Makefile.inc Tue Mar 13 22:37:51 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2012/03/13 22:12:40 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.11 2012/03/13 22:37:51 joerg Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -25,7 +25,6 @@ USE_SHLIBDIR= yes WARNS=4 CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC -CWARNFLAGS+= -Wno-constant-conversion .if (${USE_HESIOD} != "no") CPPFLAGS+= -DHESIOD Index: src/lib/libc/compat/gen/compat___fts13.c diff -u src/lib/libc/compat/gen/compat___fts13.c:1.7 src/lib/libc/compat/gen/compat___fts13.c:1.8 --- src/lib/libc/compat/gen/compat___fts13.c:1.7 Tue Mar 13 21:13:31 2012 +++ src/lib/libc/compat/gen/compat___fts13.c Tue Mar 13 22:37:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat___fts13.c,v 1.7 2012/03/13 21:13:31 christos Exp $ */ +/* $NetBSD: compat___fts13.c,v 1.8 2012/03/13 22:37:51 joerg Exp $ */ #include "namespace.h" #include @@ -33,10 +33,12 @@ __warn_references(__fts_set13, #define __fts_dev_t uint32_t #define __fts_level_t short -#ifndef fts_namelen_truncate +#undef fts_namelen_truncate #define fts_namelen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) -#endif +#undef fts_pathlen_truncate +#define ftsent_pathlen_truncate(a) \ +((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) #define stat __stat13 #define lstat __lstat13 Index: src/lib/libc/compat/gen/compat___fts30.c diff -u src/lib/libc/compat/gen/compat___fts30.c:1.4 src/lib/libc/compat/gen/compat___fts30.c:1.5 --- src/lib/libc/compat/gen/compat___fts30.c:1.4 Tue Mar 13 21:13:31 2012 +++ src/lib/libc/compat/gen/compat___fts30.c Tue Mar 13 22:37:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat___fts30.c,v 1.4 2012/03/13 21:13:31 christos Exp $ */ +/* $NetBSD: compat___fts30.c,v 1.5 2012/03/13 22:37:51 joerg Exp $ */ #include "namespace.h" #include @@ -40,6 +40,9 @@ __warn_references(__fts_set30, #define fts_namelen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) #endif +#undef fts_pathlen_truncate +#define ftsent_pathlen_truncate(a) \ +((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) #undef fts_children #define fts_children __fts_children30 Index: src/lib/libc/compat/gen/compat_fts.c diff -u src/lib/libc/compat/gen/compat_fts.c:1.4 src/lib/libc/compat/gen/compat_fts.c:1.5 --- src/lib/libc/compat/gen/compat_fts.c:1.4 Mon Oct 19 17:52:05 2009 +++ src/lib/libc/compat/gen/compat_fts.c Tue Mar 13 22:37:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_fts.c,v 1.4 2009/10/19 17:52:05 christos Exp $ */ +/* $NetBSD: compat_fts.c,v 1.5 2012/03/13 22:37:51 joerg Exp $ */ /* * Written by Jason R. Thorpe , October 21, 1997. @@ -22,6 +22,13 @@ #define __fts_dev_t uint32_t #define __fts_level_t short +#undef fts_namelen_truncate +#define fts_namelen_truncate(a) \ +((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) +#undef fts_pathlen_truncate +#define ftsent_pathlen_truncate(a) \ +((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) + #include #include
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Wed Mar 14 00:25:19 UTC 2012 Modified Files: src/lib/libc/compat/gen: compat___fts13.c compat___fts30.c compat___fts31.c src/lib/libc/gen: fts.c Log Message: rename the macros ftsent_ since they apply to the ftsent struct not the fts one. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/compat/gen/compat___fts13.c cvs rdiff -u -r1.5 -r1.6 src/lib/libc/compat/gen/compat___fts30.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/gen/compat___fts31.c cvs rdiff -u -r1.43 -r1.44 src/lib/libc/gen/fts.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compat/gen/compat___fts13.c diff -u src/lib/libc/compat/gen/compat___fts13.c:1.8 src/lib/libc/compat/gen/compat___fts13.c:1.9 --- src/lib/libc/compat/gen/compat___fts13.c:1.8 Tue Mar 13 18:37:51 2012 +++ src/lib/libc/compat/gen/compat___fts13.c Tue Mar 13 20:25:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat___fts13.c,v 1.8 2012/03/13 22:37:51 joerg Exp $ */ +/* $NetBSD: compat___fts13.c,v 1.9 2012/03/14 00:25:19 christos Exp $ */ #include "namespace.h" #include @@ -33,12 +33,14 @@ __warn_references(__fts_set13, #define __fts_dev_t uint32_t #define __fts_level_t short -#undef fts_namelen_truncate -#define fts_namelen_truncate(a) \ +#ifndef ftsent_namelen_truncate +#define ftsent_namelen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) -#undef fts_pathlen_truncate +#endif +#ifndef ftsent_pathlen_truncate #define ftsent_pathlen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) +#endif #define stat __stat13 #define lstat __lstat13 Index: src/lib/libc/compat/gen/compat___fts30.c diff -u src/lib/libc/compat/gen/compat___fts30.c:1.5 src/lib/libc/compat/gen/compat___fts30.c:1.6 --- src/lib/libc/compat/gen/compat___fts30.c:1.5 Tue Mar 13 18:37:51 2012 +++ src/lib/libc/compat/gen/compat___fts30.c Tue Mar 13 20:25:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat___fts30.c,v 1.5 2012/03/13 22:37:51 joerg Exp $ */ +/* $NetBSD: compat___fts30.c,v 1.6 2012/03/14 00:25:19 christos Exp $ */ #include "namespace.h" #include @@ -36,13 +36,14 @@ __warn_references(__fts_set30, #define lstat __lstat30 #define fstat __fstat30 -#ifndef fts_namelen_truncate -#define fts_namelen_truncate(a) \ +#ifndef ftsent_namelen_truncate +#define ftsent_namelen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) #endif -#undef fts_pathlen_truncate +#ifndef ftsent_pathlen_truncate #define ftsent_pathlen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) +#endif #undef fts_children #define fts_children __fts_children30 Index: src/lib/libc/compat/gen/compat___fts31.c diff -u src/lib/libc/compat/gen/compat___fts31.c:1.3 src/lib/libc/compat/gen/compat___fts31.c:1.4 --- src/lib/libc/compat/gen/compat___fts31.c:1.3 Tue Mar 13 17:13:31 2012 +++ src/lib/libc/compat/gen/compat___fts31.c Tue Mar 13 20:25:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat___fts31.c,v 1.3 2012/03/13 21:13:31 christos Exp $ */ +/* $NetBSD: compat___fts31.c,v 1.4 2012/03/14 00:25:19 christos Exp $ */ #include "namespace.h" #include @@ -31,8 +31,12 @@ __warn_references(__fts_set31, #define __fts_dev_t uint32_t #define __fts_level_t short -#ifndef fts_namelen_truncate -#define fts_namelen_truncate(a) \ +#ifndef ftsent_namelen_truncate +#define ftsent_namelen_truncate(a) \ +((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) +#endif +#ifndef ftsent_pathlen_truncate +#define ftsent_pathlen_truncate(a) \ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a)) #endif Index: src/lib/libc/gen/fts.c diff -u src/lib/libc/gen/fts.c:1.43 src/lib/libc/gen/fts.c:1.44 --- src/lib/libc/gen/fts.c:1.43 Tue Mar 13 17:13:35 2012 +++ src/lib/libc/gen/fts.c Tue Mar 13 20:25:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fts.c,v 1.43 2012/03/13 21:13:35 christos Exp $ */ +/* $NetBSD: fts.c,v 1.44 2012/03/14 00:25:19 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -__RCSID("$NetBSD: fts.c,v 1.43 2012/03/13 21:13:35 christos Exp $"); +__RCSID("$NetBSD: fts.c,v 1.44 2012/03/14 00:25:19 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -79,20 +79,20 @@ static int fts_safe_changedir(const FTS #undef FTS_ALLOC_ALIGNED #endif -#ifndef fts_namelen_truncate -#define fts_namelen_truncate(a) \ -((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) -#endif -#ifndef fts_pathlen_truncate -#define fts_pathlen_truncate(a) \ +#ifndef ftsent_namelen_truncate +#define ftsent_namelen_truncate(a) \ ((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) #endif #ifndef ftsent_pathlen_truncate #define ftsent_pathlen_truncate(a) \ ((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) #endif -#ifndef ftsent_nitems_truncate -#define ftsent_nite
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: pgoyette Date: Wed Mar 14 02:57:10 UTC 2012 Modified Files: src/sys/dev/i2c: i2c.c Log Message: Don't try to match a device if there's already a device attached at the specified address. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/i2c/i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.37 src/sys/dev/i2c/i2c.c:1.38 --- src/sys/dev/i2c/i2c.c:1.37 Tue Oct 11 15:19:09 2011 +++ src/sys/dev/i2c/i2c.c Wed Mar 14 02:57:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.37 2011/10/11 15:19:09 macallan Exp $ */ +/* $NetBSD: i2c.c,v 1.38 2012/03/14 02:57:10 pgoyette Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.37 2011/10/11 15:19:09 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.38 2012/03/14 02:57:10 pgoyette Exp $"); #include #include @@ -118,10 +118,10 @@ iic_search(device_t parent, cfdata_t cf, ia.ia_ncompat = 0; ia.ia_compat = NULL; - if (config_match(parent, cf, &ia) > 0) { - if (ia.ia_addr != (i2c_addr_t)-1 && - ia.ia_addr <= I2C_MAX_ADDR && - !sc->sc_devices[ia.ia_addr]) + if (ia.ia_addr != (i2c_addr_t)-1 && + ia.ia_addr <= I2C_MAX_ADDR && + !sc->sc_devices[ia.ia_addr]) + if (config_match(parent, cf, &ia) > 0) { sc->sc_devices[ia.ia_addr] = config_attach(parent, cf, &ia, iic_print); }