Bug 211087 - sys/arm/ti/cpsw/if_cpsw.c:1937: bad expression ?
Summary: sys/arm/ti/cpsw/if_cpsw.c:1937: bad expression ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 17:55 UTC by David Binderman
Modified: 2019-02-08 13:47 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 2016-07-13 17:55:18 UTC
sys/arm/ti/cpsw/if_cpsw.c:1937]: (style) Expression '(X & 0x8800) == 0x4800' is always false.

Source code is

        if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) ==
            (CPDMA_BD_EOP | CPDMA_BD_TDOWNCMPLT)) {

Maybe better code

        if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) ==
            (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) {
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-02-08 13:47:49 UTC
Fixed in base r306388.