Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-cfargs]: src/sys Treat config_probe() as if it were a boolean fu...
details: https://anonhg.NetBSD.org/src/rev/a85c2a3b11dd
branches: thorpej-cfargs
changeset: 954313:a85c2a3b11dd
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Apr 05 01:01:41 2021 +0000
description:
Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
diffstat:
sys/arch/acorn32/eb7500atx/rsbus.c | 6 +++---
sys/arch/acorn32/mainbus/pioc.c | 8 ++++----
sys/arch/arm/at91/at91bus.c | 6 +++---
sys/arch/arm/at91/at91pio.c | 8 ++++----
sys/arch/arm/ep93xx/epgpio.c | 6 +++---
sys/arch/arm/ep93xx/epsoc.c | 6 +++---
sys/arch/arm/imx/imx23_ahb.c | 4 ++--
sys/arch/arm/imx/imx23_apbh.c | 4 ++--
sys/arch/arm/imx/imx23_apbx.c | 6 +++---
sys/arch/arm/imx/imx23_usb.c | 4 ++--
sys/arch/arm/imx/imx51_axi.c | 8 ++++----
sys/arch/arm/imx/imx51_usb.c | 6 +++---
sys/arch/arm/iomd/vidc20.c | 6 +++---
sys/arch/arm/ixp12x0/ixpsip.c | 6 +++---
sys/arch/arm/mainbus/mainbus.c | 6 +++---
sys/arch/arm/mpcore/mpcore_axi.c | 8 ++++----
sys/arch/arm/mpcore/mpcore_pmr.c | 6 +++---
sys/arch/arm/sa11x0/sa1111.c | 6 +++---
sys/arch/arm/sa11x0/sa11x0.c | 6 +++---
sys/arch/arm/xscale/becc.c | 6 +++---
sys/arch/arm/xscale/ixp425_ixme.c | 6 +++---
sys/arch/arm/xscale/ixp425_npe.c | 6 +++---
sys/arch/arm/xscale/ixp425_sip.c | 6 +++---
sys/arch/arm/zynq/zynq_axi.c | 8 ++++----
sys/arch/atari/vme/vme.c | 6 +++---
sys/arch/cesfic/cesfic/autoconf.c | 6 +++---
sys/arch/cobalt/cobalt/mainbus.c | 6 +++---
sys/arch/dreamcast/dev/g1/g1bus.c | 6 +++---
sys/arch/dreamcast/dev/g2/g2bus.c | 6 +++---
sys/arch/epoc32/epoc32/internal.c | 6 +++---
sys/arch/evbarm/adi_brh/obio.c | 6 +++---
sys/arch/evbarm/g42xxeb/gb225.c | 4 ++--
sys/arch/evbarm/g42xxeb/obio.c | 4 ++--
sys/arch/evbarm/hdl_g/obio.c | 6 +++---
sys/arch/evbarm/ifpga/ifpga.c | 6 +++---
sys/arch/evbarm/iq80310/obio.c | 6 +++---
sys/arch/evbarm/iq80321/obio.c | 6 +++---
sys/arch/evbarm/iyonix/obio.c | 6 +++---
sys/arch/evbarm/tsarm/tspld.c | 6 +++---
sys/arch/hp300/dev/hpib.c | 6 +++---
sys/arch/hp300/hp300/autoconf.c | 6 +++---
sys/arch/hpcarm/dev/ipaq_atmelgpio.c | 6 +++---
sys/arch/hpcarm/dev/ipaq_saip.c | 6 +++---
sys/arch/hpcarm/dev/j720ssp.c | 6 +++---
sys/arch/hpcarm/dev/uda1341.c | 6 +++---
sys/arch/iyonix/iyonix/obio.c | 6 +++---
sys/arch/landisk/dev/obio.c | 6 +++---
sys/arch/mac68k/mac68k/mainbus.c | 6 +++---
sys/arch/mac68k/obio/obio.c | 6 +++---
sys/arch/mips/ralink/ralink_mainbus.c | 6 +++---
sys/arch/mips/rmi/rmixl_iobus.c | 6 +++---
sys/arch/mips/rmi/rmixl_mainbus.c | 6 +++---
sys/arch/mips/rmi/rmixl_obio.c | 6 +++---
sys/arch/mips/rmi/rmixl_usbi.c | 6 +++---
sys/arch/mips/sibyte/dev/sbgbus.c | 6 +++---
sys/arch/mipsco/obio/obio.c | 6 +++---
sys/arch/news68k/dev/hb.c | 6 +++---
sys/arch/news68k/news68k/mainbus.c | 6 +++---
sys/arch/newsmips/dev/hb.c | 6 +++---
sys/arch/next68k/dev/intio.c | 6 +++---
sys/arch/next68k/next68k/mainbus.c | 6 +++---
sys/arch/powerpc/booke/dev/pq3obio.c | 6 +++---
sys/arch/prep/pnpbus/pnpbus.c | 6 +++---
sys/arch/rs6000/mca/ioplanar.c | 4 ++--
sys/arch/sandpoint/sandpoint/eumb.c | 6 +++---
sys/arch/sgimips/gio/gio.c | 6 +++---
sys/arch/sgimips/ioc/ioc.c | 6 +++---
sys/arch/sgimips/mace/mace.c | 6 +++---
sys/arch/sgimips/sgimips/mainbus.c | 6 +++---
sys/arch/sh3/dev/adc.c | 6 +++---
sys/arch/sh3/dev/shb.c | 6 +++---
sys/arch/sparc/dev/obio.c | 6 +++---
sys/arch/sun3/sun3/autoconf.c | 6 +++---
sys/arch/sun68k/sun68k/autoconf.c | 6 +++---
sys/arch/x68k/dev/intio.c | 6 +++---
sys/arch/x68k/dev/mfp.c | 6 +++---
sys/dev/gpib/cs80bus.c | 6 +++---
sys/dev/gpib/gpib.c | 8 ++++----
sys/dev/gpio/gpio.c | 6 +++---
sys/dev/isa/isa.c | 6 +++---
sys/dev/isa/tsdio.c | 6 +++---
sys/dev/marvell/obio.c | 6 +++---
sys/dev/ppbus/ppbus_conf.c | 6 +++---
sys/dev/spi/spi.c | 6 +++---
sys/rump/librump/rumpkern/rump_autoconf.c | 6 +++---
85 files changed, 255 insertions(+), 255 deletions(-)
diffs (truncated from 2286 to 300 lines):
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/acorn32/eb7500atx/rsbus.c
--- a/sys/arch/acorn32/eb7500atx/rsbus.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/acorn32/eb7500atx/rsbus.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rsbus.c,v 1.10.52.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: rsbus.c,v 1.10.52.6 2021/04/05 01:01:41 thorpej Exp $ */
/*
* Copyright (c) 2002
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rsbus.c,v 1.10.52.5 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rsbus.c,v 1.10.52.6 2021/04/05 01:01:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -86,7 +86,7 @@
sa.sa_size = cf->cf_loc[RSBUSCF_SIZE];
sa.sa_intr = cf->cf_loc[RSBUSCF_IRQ];
- if (config_probe(parent, cf, &sa) > 0)
+ if (config_probe(parent, cf, &sa))
config_attach(parent, cf, &sa, rsbus_print, CFARG_EOL);
return (0);
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/acorn32/mainbus/pioc.c
--- a/sys/arch/acorn32/mainbus/pioc.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/acorn32/mainbus/pioc.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pioc.c,v 1.18.52.7 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: pioc.c,v 1.18.52.8 2021/04/05 01:01:41 thorpej Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -41,7 +41,7 @@
/*#define PIOC_DEBUG*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.18.52.7 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.18.52.8 2021/04/05 01:01:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -233,7 +233,7 @@
}
tryagain = 0;
- if (config_probe(parent, cf, &pa) > 0) {
+ if (config_probe(parent, cf, &pa)) {
config_attach(parent, cf, &pa, piocprint, CFARG_EOL);
/* tryagain = (cf->cf_fstate == FSTATE_STAR);*/
}
@@ -266,7 +266,7 @@
if (pa->pa_irq == -1)
pa->pa_irq = cf->cf_loc[PIOCCF_IRQ];
tryagain = 0;
- if (config_probe(parent, cf, pa) > 0) {
+ if (config_probe(parent, cf, pa)) {
config_attach(parent, cf, pa, piocprint, CFARG_EOL);
/* tryagain = (cf->cf_fstate == FSTATE_STAR);*/
}
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/at91/at91bus.c
--- a/sys/arch/arm/at91/at91bus.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/at91/at91bus.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: at91bus.c,v 1.27.4.7 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: at91bus.c,v 1.27.4.8 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.27.4.7 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.27.4.8 2021/04/05 01:01:42 thorpej Exp $");
#include "opt_arm_debug.h"
#include "opt_console.h"
@@ -651,7 +651,7 @@
sa->sa_size = cf->cf_loc[AT91BUSCF_SIZE];
sa->sa_pid = cf->cf_loc[AT91BUSCF_PID];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, at91bus_print, CFARG_EOL);
return (0);
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/at91/at91pio.c
--- a/sys/arch/arm/at91/at91pio.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/at91/at91pio.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,5 +1,5 @@
-/* $Id: at91pio.c,v 1.6.52.5 2021/04/05 00:48:45 thorpej Exp $ */
-/* $NetBSD: at91pio.c,v 1.6.52.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $Id: at91pio.c,v 1.6.52.6 2021/04/05 01:01:42 thorpej Exp $ */
+/* $NetBSD: at91pio.c,v 1.6.52.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91pio.c,v 1.6.52.5 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91pio.c,v 1.6.52.6 2021/04/05 01:01:42 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -223,7 +223,7 @@
paa.paa_pid = cf->cf_loc[AT91PIOCF_PID];
paa.paa_bit = cf->cf_loc[AT91PIOCF_BIT];
- if (config_probe(parent, cf, &paa) > 0)
+ if (config_probe(parent, cf, &paa))
config_attach(parent, cf, &paa, at91pio_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/ep93xx/epgpio.c
--- a/sys/arch/arm/ep93xx/epgpio.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/ep93xx/epgpio.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: epgpio.c,v 1.5.52.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: epgpio.c,v 1.5.52.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epgpio.c,v 1.5.52.5 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epgpio.c,v 1.5.52.6 2021/04/05 01:01:42 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -349,7 +349,7 @@
ga.ga_bit1 = cf->cf_loc[EPGPIOCF_BIT1];
ga.ga_bit2 = cf->cf_loc[EPGPIOCF_BIT2];
- if (config_probe(parent, cf, &ga) > 0)
+ if (config_probe(parent, cf, &ga))
config_attach(parent, cf, &ga, epgpio_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/ep93xx/epsoc.c
--- a/sys/arch/arm/ep93xx/epsoc.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/ep93xx/epsoc.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: epsoc.c,v 1.13.52.7 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: epsoc.c,v 1.13.52.8 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epsoc.c,v 1.13.52.7 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epsoc.c,v 1.13.52.8 2021/04/05 01:01:42 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -205,7 +205,7 @@
sa->sa_size = cf->cf_loc[EPSOCCF_SIZE];
sa->sa_intr = cf->cf_loc[EPSOCCF_INTR];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, epsoc_print, CFARG_EOL);
return (0);
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx23_ahb.c
--- a/sys/arch/arm/imx/imx23_ahb.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx23_ahb.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $Id: imx23_ahb.c,v 1.1.50.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $Id: imx23_ahb.c,v 1.1.50.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@
aa->aa_size = cf->cf_loc[AHBCF_SIZE];
aa->aa_irq = cf->cf_loc[AHBCF_IRQ];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, ahb_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx23_apbh.c
--- a/sys/arch/arm/imx/imx23_apbh.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx23_apbh.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $Id: imx23_apbh.c,v 1.1.56.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $Id: imx23_apbh.c,v 1.1.56.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -126,7 +126,7 @@
aa->aa_size = cf->cf_loc[APBHCF_SIZE];
aa->aa_irq = cf->cf_loc[APBHCF_IRQ];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, apbh_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx23_apbx.c
--- a/sys/arch/arm/imx/imx23_apbx.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx23_apbx.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $Id: imx23_apbx.c,v 1.1.56.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $Id: imx23_apbx.c,v 1.1.56.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -126,7 +126,7 @@
aa->aa_size = cf->cf_loc[APBXCF_SIZE];
aa->aa_irq = cf->cf_loc[APBXCF_IRQ];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, apbx_print, CFARG_EOL);
return 0;
@@ -150,7 +150,7 @@
aa->aa_size = cf->cf_loc[APBXCF_SIZE];
aa->aa_irq = cf->cf_loc[APBXCF_IRQ];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, apbx_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx23_usb.c
--- a/sys/arch/arm/imx/imx23_usb.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx23_usb.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $Id: imx23_usb.c,v 1.3.2.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $Id: imx23_usb.c,v 1.3.2.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
aa.aa_unit = cf->cf_loc[IMXUSBCCF_UNIT];
aa.aa_irq = cf->cf_loc[IMXUSBCCF_IRQ];
- if (config_probe(parent, cf, &aa) > 0)
+ if (config_probe(parent, cf, &aa))
config_attach(parent, cf, &aa, NULL, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx51_axi.c
--- a/sys/arch/arm/imx/imx51_axi.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx51_axi.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imx51_axi.c,v 1.7.16.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: imx51_axi.c,v 1.7.16.6 2021/04/05 01:01:42 thorpej Exp $ */
/*-
* Copyright (c) 2010 SHIMIZU Ryo <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx51_axi.c,v 1.7.16.5 2021/04/05 00:48:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx51_axi.c,v 1.7.16.6 2021/04/05 01:01:42 thorpej Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -115,7 +115,7 @@
aa->aa_irq = cf->cf_loc[AXICF_IRQ];
aa->aa_irqbase = cf->cf_loc[AXICF_IRQBASE];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, axi_print, CFARG_EOL);
return 0;
@@ -136,7 +136,7 @@
aa->aa_irq = cf->cf_loc[AXICF_IRQ];
aa->aa_irqbase = cf->cf_loc[AXICF_IRQBASE];
- if (config_probe(parent, cf, aux) > 0)
+ if (config_probe(parent, cf, aux))
config_attach(parent, cf, aux, axi_print, CFARG_EOL);
return 0;
diff -r cb574a8ebbad -r a85c2a3b11dd sys/arch/arm/imx/imx51_usb.c
--- a/sys/arch/arm/imx/imx51_usb.c Mon Apr 05 00:48:45 2021 +0000
+++ b/sys/arch/arm/imx/imx51_usb.c Mon Apr 05 01:01:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imx51_usb.c,v 1.5.12.5 2021/04/05 00:48:45 thorpej Exp $ */
+/* $NetBSD: imx51_usb.c,v 1.5.12.6 2021/04/05 01:01:42 thorpej Exp $ */
/*
* Copyright (c) 2010 Genetec Corporation. All rights reserved.
* Written by Hiroyuki Bessho for Genetec Corporation.
@@ -25,7 +25,7 @@
Home |
Main Index |
Thread Index |
Old Index