Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/hppa KNF
details: https://anonhg.NetBSD.org/src/rev/b20aeffe7fb4
branches: trunk
changeset: 998685:b20aeffe7fb4
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Apr 26 18:37:24 2019 +0000
description:
KNF
diffstat:
sys/arch/hppa/hppa/mainbus.c | 46 ++++++++++++++++++++++----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diffs (196 lines):
diff -r 3d5d5154d5ff -r b20aeffe7fb4 sys/arch/hppa/hppa/mainbus.c
--- a/sys/arch/hppa/hppa/mainbus.c Fri Apr 26 18:25:08 2019 +0000
+++ b/sys/arch/hppa/hppa/mainbus.c Fri Apr 26 18:37:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.3 2019/04/15 20:45:08 skrll Exp $ */
+/* $NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $");
#include "locators.h"
#include "power.h"
@@ -249,7 +249,7 @@
*/
error = extent_alloc_region(hppa_io_extent, bpa, size, EX_NOWAIT);
if (error)
- return (error);
+ return error;
/*
* Map the region of I/O space.
@@ -301,7 +301,7 @@
error = extent_alloc_subregion1(hppa_io_extent, rstart, rend, size,
align, 0, boundary, EX_NOWAIT, &bpa);
if (error)
- return (error);
+ return error;
/*
* Map the region of I/O space.
@@ -758,7 +758,7 @@
map = malloc(mapsize, M_DMAMAP,
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
if (!map)
- return (ENOMEM);
+ return ENOMEM;
memset(map, 0, mapsize);
map->_dm_size = size;
@@ -770,7 +770,7 @@
map->dm_nsegs = 0;
*dmamp = map;
- return (0);
+ return 0;
}
/*
@@ -808,7 +808,7 @@
map->dm_nsegs = 0;
if (buflen > map->_dm_size)
- return (EINVAL);
+ return EINVAL;
if (p != NULL) {
vm = p->p_vmspace;
@@ -823,7 +823,7 @@
map->dm_mapsize = buflen;
map->dm_nsegs = seg + 1;
}
- return (error);
+ return error;
}
/*
@@ -846,7 +846,7 @@
KASSERT(m0->m_flags & M_PKTHDR);
if (m0->m_pkthdr.len > map->_dm_size)
- return (EINVAL);
+ return EINVAL;
first = 1;
seg = 0;
@@ -862,7 +862,7 @@
map->dm_mapsize = m0->m_pkthdr.len;
map->dm_nsegs = seg + 1;
}
- return (error);
+ return error;
}
/*
@@ -908,7 +908,7 @@
map->dm_mapsize = uio->uio_resid;
map->dm_nsegs = seg + 1;
}
- return (error);
+ return error;
}
/*
@@ -960,7 +960,7 @@
map->dm_nsegs = seg + 1;
map->dm_mapsize = mapsize;
- return (0);
+ return 0;
}
/*
@@ -1070,7 +1070,7 @@
if ((mlist = malloc(sizeof(*mlist), M_DEVBUF,
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
- return (ENOMEM);
+ return ENOMEM;
/*
* Allocate physical pages from the VM system.
@@ -1085,7 +1085,7 @@
" failed", __func__, size, low, high, mlist, nsegs,
(flags & BUS_DMA_NOWAIT) == 0));
free(mlist, M_DEVBUF);
- return (error);
+ return error;
}
pa_next = 0;
@@ -1097,7 +1097,7 @@
if (++seg >= nsegs) {
uvm_pglistfree(mlist);
free(mlist, M_DEVBUF);
- return (ENOMEM);
+ return ENOMEM;
}
segs[seg].ds_addr = pa;
segs[seg].ds_len = PAGE_SIZE;
@@ -1122,7 +1122,7 @@
* We now have physical pages, but no kernel virtual addresses yet.
* These may be allocated in bus_dmamap_map.
*/
- return (0);
+ return 0;
}
void
@@ -1161,7 +1161,7 @@
/* Get a chunk of kernel virtual space. */
va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY | kmflags);
if (__predict_false(va == 0))
- return (ENOMEM);
+ return ENOMEM;
*kvap = (void *)va;
@@ -1180,7 +1180,7 @@
}
}
pmap_update(pmap_kernel());
- return (0);
+ return 0;
}
/*
@@ -1219,11 +1219,11 @@
continue;
}
- return (btop((u_long)segs[i].ds_addr + off));
+ return btop((u_long)segs[i].ds_addr + off);
}
/* Page not found. */
- return (-1);
+ return -1;
}
int
@@ -1304,8 +1304,8 @@
* Did we fit?
*/
if (buflen != 0)
- return (EFBIG); /* XXX better return value here? */
- return (0);
+ return EFBIG; /* XXX better return value here? */
+ return 0;
}
const struct hppa_bus_dma_tag hppa_dmatag = {
@@ -1476,7 +1476,7 @@
}
}
- return (UNCONF);
+ return UNCONF;
}
int
Home |
Main Index |
Thread Index |
Old Index