Bug 211087

Summary: sys/arm/ti/cpsw/if_cpsw.c:1937: bad expression ?
Product: Base System Reporter: David Binderman <dcb314>
Component: armAssignee: freebsd-arm mailing list <freebsd-arm>
Status: Closed FIXED    
Severity: Affects Some People CC: avos
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

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 2019-02-08 13:47:49 UTC
Fixed in base r306388.