diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-12-20 13:40:51 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-12-20 13:40:51 +0000 |
commit | 5b7dbcce8dcd715e8c6695cf996839e045a92406 (patch) | |
tree | 54b95f44fe76aec9a4917bb80310d323b7cb1d4c /sys | |
parent | e0c1b8383a4e1980a3827c2941be123507befe93 (diff) |
no need to test if an array is non-NULL
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/dev/cbus.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pyro.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/vpci.c | 7 |
3 files changed, 6 insertions, 15 deletions
diff --git a/sys/arch/sparc64/dev/cbus.c b/sys/arch/sparc64/dev/cbus.c index b99e87f8e24..c45043f730c 100644 --- a/sys/arch/sparc64/dev/cbus.c +++ b/sys/arch/sparc64/dev/cbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cbus.c,v 1.15 2015/09/27 11:29:20 kettenis Exp $ */ +/* $OpenBSD: cbus.c,v 1.16 2016/12/20 13:40:50 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -181,10 +181,7 @@ cbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, if (flags & BUS_INTR_ESTABLISH_MPSAFE) ih->ih_mpsafe = 1; - if (ih->ih_name) - evcount_attach(&ih->ih_count, ih->ih_name, NULL); - else - evcount_attach(&ih->ih_count, "unknown", NULL); + evcount_attach(&ih->ih_count, ih->ih_name, NULL); ih->ih_ack = cbus_intr_ack; ih->ih_cpu = cpus; diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c index b95d6cc1a82..777eccfdce1 100644 --- a/sys/arch/sparc64/dev/pyro.c +++ b/sys/arch/sparc64/dev/pyro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pyro.c,v 1.29 2016/08/23 03:28:01 guenther Exp $ */ +/* $OpenBSD: pyro.c,v 1.30 2016/12/20 13:40:50 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -622,10 +622,7 @@ pyro_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, if (ih == NULL) return (NULL); - if (ih->ih_name) - evcount_attach(&ih->ih_count, ih->ih_name, NULL); - else - evcount_attach(&ih->ih_count, "unknown", NULL); + evcount_attach(&ih->ih_count, ih->ih_name, NULL); ih->ih_ack = pyro_msi_ack; diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c index 7a126e35e66..e770ccccc19 100644 --- a/sys/arch/sparc64/dev/vpci.c +++ b/sys/arch/sparc64/dev/vpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vpci.c,v 1.20 2016/05/19 09:18:42 kettenis Exp $ */ +/* $OpenBSD: vpci.c,v 1.21 2016/12/20 13:40:50 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> * @@ -519,10 +519,7 @@ vpci_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, pcitag_t tag = ihandle & ~PCI_INTR_MSI; int msinum = pbm->vp_msinum++; - if (ih->ih_name) - evcount_attach(&ih->ih_count, ih->ih_name, NULL); - else - evcount_attach(&ih->ih_count, "unknown", NULL); + evcount_attach(&ih->ih_count, ih->ih_name, NULL); ih->ih_ack = vpci_msi_ack; |