Created attachment 180765 [details] git patch We have found and fixed bugs using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/ Analyzer warning: V547 Expression 'cfgflags >= 0 || cfgflags <= 3' is always true. hwpmc_piv.c 812 V547 Expression 'cfgflags >= 0 || cfgflags <= 3' is always true. hwpmc_piv.c 838
A commit references this bug: Author: kib Date: Tue Aug 8 15:46:30 UTC 2017 New revision: 322256 URL: https://svnweb.freebsd.org/changeset/base/322256 Log: Fix logic error in the the assert, causing the condition to be always true. Also improve the formatting of the corresponding KASSERT message. Based on the submission by: Svyatoslav <razmyslov@viva64.com> Found by: PVS-Studio PR: 217741 Reviewed by: emaste Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Changes: head/sys/dev/hwpmc/hwpmc_piv.c
A commit references this bug: Author: kib Date: Tue Aug 15 09:36:01 UTC 2017 New revision: 322532 URL: https://svnweb.freebsd.org/changeset/base/322532 Log: MFC r322256: Fix logic error in the the assert, causing the condition to be always true. PR: 217741 Changes: _U stable/11/ stable/11/sys/dev/hwpmc/hwpmc_piv.c
A commit references this bug: Author: kib Date: Tue Aug 15 14:21:44 UTC 2017 New revision: 322543 URL: https://svnweb.freebsd.org/changeset/base/322543 Log: MFC r322256: Fix logic error in the the assert, causing the condition to be always true. PR: 217741 Approved by: re (gjb) Changes: _U stable/10/ stable/10/sys/dev/hwpmc/hwpmc_piv.c
MFCed Tue Aug 15 14:21:44 UTC 2017.