aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2020-03-16 22:25:25 +0000
committerConrad Meyer <cem@FreeBSD.org>2020-03-16 22:25:25 +0000
commita99c321802f5ea2e079e7b6732d7655603ec3288 (patch)
tree49fa7e568442f421ca38277397d6305b4f917ae7 /sys/kern/kern_timeout.c
parentcf2f2eb5687777b0664fc619bd2cd704b1b9187b (diff)
downloadsrc-a99c321802f5ea2e079e7b6732d7655603ec3288.tar.gz
src-a99c321802f5ea2e079e7b6732d7655603ec3288.zip
Remove misleading / redundant bzero in callout_callwheel_init
The intent seems to be zeroing all of the cc_cpu array, or its singleton on such platforms. The assumption made is that the BSP is always zero. The code smell was introduced in r326218, which changed the prior explicit zero to 'curcpu'. The change is only valid if curcpu continues to be zero, contrary to the aim expressed in that commit message. So, more succinctly, the expression could be: memset(cc_cpu,0,sizeof(cc_cpu)). However, there's no point. cc_cpu lives in the data section and has a zero initial value already. So this revision just removes the problematic statement. No functional change. Appeases a (false positive, ish) Coverity CID. CID: 1383567 Reported by: Puneeth Jothaiah <puneethkumar.jothaia AT dell.com> Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24089
Notes
Notes: svn path=/head/; revision=359022
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index d82b9bf2e941..6091a3db2fa9 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -285,7 +285,6 @@ callout_callwheel_init(void *dummy)
* XXX: Clip callout to result of previous function of maxusers
* maximum 384. This is still huge, but acceptable.
*/
- memset(CC_CPU(curcpu), 0, sizeof(cc_cpu));
ncallout = imin(16 + maxproc + maxfiles, 18508);
TUNABLE_INT_FETCH("kern.ncallout", &ncallout);