Bug 210099

Summary: Remove redundant MPASS which always evaluates to true in kern/subr_sleepqueue.c
Product: Base System Reporter: Bulat <bltsrc>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Works As Intended    
Severity: Affects Many People CC: jhb
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Remove line of redundant always-true MPASS check. none

Description Bulat 2016-06-07 12:50:10 UTC
Created attachment 171141 [details]
Remove line of redundant always-true MPASS check.

Remove MPASS(wchan == sq->sq_wchan) as there is invariant that return value(sq) returned from sleepq_lookup, if not null, has sq->wchan = wchan where wchan is the parameter passed to sleepq_lookup.
Comment 1 Bulat 2016-06-07 12:51:38 UTC
File: kern/subr_sleepqueue.c
File revision: r300109
Comment 2 John Baldwin freebsd_committer freebsd_triage 2017-03-22 16:46:12 UTC
The purpose of an assertion is to ensure that it the code is doing what is expected.  In particular in this case the assertion is verifying that sleepq_lookup() did in fact return a sleepqueue with a matching wait channel.