aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000/if_em.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2014-10-21 07:31:21 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2014-10-21 07:31:21 +0000
commitf0188618f2abe08246731cf09b0b0a99609fd34c (patch)
treeee67959a46304c59df434799575e3820a2cc841f /sys/dev/e1000/if_em.c
parent7eb884645c96add0d48c306ae9ecb053af2623f7 (diff)
downloadsrc-f0188618f2abe08246731cf09b0b0a99609fd34c.tar.gz
src-f0188618f2abe08246731cf09b0b0a99609fd34c.zip
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
Notes
Notes: svn path=/head/; revision=273377
Diffstat (limited to 'sys/dev/e1000/if_em.c')
-rw-r--r--sys/dev/e1000/if_em.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 070bb5b2f3ea..252571b611c2 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -5644,7 +5644,7 @@ em_set_sysctl_value(struct adapter *adapter, const char *name,
*limit = value;
SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter->dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)),
- OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, limit, value, description);
+ OID_AUTO, name, CTLFLAG_RW, limit, value, description);
}