Bug 200984 - sys/dev/bce/if_bce.c: 2 * bad if
Summary: sys/dev/bce/if_bce.c: 2 * bad if
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-20 08:27 UTC by David Binderman
Modified: 2025-02-02 17:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2015-06-20 08:27:53 UTC
1.

sys/dev/bce/if_bce.c:11283]: (warning)
 Logical conjunction always evaluates to false: i < 807936 && i > 917503.

  if (i < 0xc5400 && i > 0xdffff)

2.

sys/dev/bce/if_bce.c:11403]: (warning)
 Logical conjunction always evaluates to false: i < 1594368 && i > 1703935.

     if (i < 0x185400 && i > 0x19ffff)
Comment 1 David Binderman 2018-07-05 19:58:53 UTC
Still broken three years later.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-02-02 16:59:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5deab77bb6d119dd171385d144a622e7ba7108fe

commit 5deab77bb6d119dd171385d144a622e7ba7108fe
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-02-02 16:49:15 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-02-02 16:49:15 +0000

    bce: Fix register dumping to skip blank area

    When compiling with debug enabled, this produces an always false
    warning. It's clear that this was to skip ranges that aren't used when
    dumping the registers, so change the && to || to skip things properly.

    PR: 200984
    Sponsored by:           Netflix

 sys/dev/bce/if_bce.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Warner Losh freebsd_committer freebsd_triage 2025-02-02 17:01:22 UTC
no MFC planned, so closing it before we hit the decade mark on this bug.

Since BCE_DEBUG has been broken for a long time, I don't think fixing this matters at all. But it's fixed.