diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-10-21 07:31:21 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-10-21 07:31:21 +0000 |
commit | 49c137f7be5791eee8102395257cdf48b40c81f7 (patch) | |
tree | ee67959a46304c59df434799575e3820a2cc841f /sys/arm | |
parent | fef9d98869a5c15698b0511d8ff1044b517f1e8f (diff) | |
download | FreeBSD-src-49c137f7be5791eee8102395257cdf48b40c81f7.zip FreeBSD-src-49c137f7be5791eee8102395257cdf48b40c81f7.tar.gz |
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier
sometimes included the SYSCTL type, which it should not, except for
procedural SYSCTL nodes.
- Logical OR where binary OR was expected.
- Properly assert the "access" argument passed to all SYSCTL macros,
using the CTASSERT macro. This applies to both static- and dynamically
created SYSCTLs.
- Properly assert the the data type for both static and dynamic
SYSCTLs. In the case of static SYSCTLs we only assert that the data
pointed to by the SYSCTL data pointer has the correct size, hence
there is no easy way to assert types in the C language outside a
C-function.
- Rewrote some code which doesn't pass a constant "access" specifier
when creating dynamic SYSCTL nodes, which is now a requirement.
- Updated "EXAMPLES" section in SYSCTL manual page.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/busdma_machdep-v6.c | 4 | ||||
-rw-r--r-- | sys/arm/arm/busdma_machdep.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c index b6df3de..8fb1a44 100644 --- a/sys/arm/arm/busdma_machdep-v6.c +++ b/sys/arm/arm/busdma_machdep-v6.c @@ -1525,9 +1525,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_ADD_ULONG(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); } diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index 57b58fc..265292d 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -1346,9 +1346,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_ADD_ULONG(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); } |