NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-emips/50525: src/sys/arch/emips/ebus/flash_ebus.c:606: bad comparison ?



>Number:         50525
>Category:       port-emips
>Synopsis:       src/sys/arch/emips/ebus/flash_ebus.c:606: bad comparison ?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-emips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 11 09:45:00 +0000 2015
>Originator:     David Binderman
>Release:        cvs dated 20151210
>Organization:
>Environment:
>Description:
[src/sys/arch/emips/ebus/flash_ebus.c:606]: (style) Expression '(X & 0xee) == 0x70' is always false.

Source code is

    if ((Status & ST_ERASE_MASK) ==
        (ST_LOCK_BIT_ERROR|ST_ERASE_SUSPENDED|ST_ERASE_ERROR)) {

but

#define ST_LOCK_BIT_ERROR    0x10
#define ST_ERASE_ERROR       0x20
#define ST_ERASE_SUSPENDED   0x40
#define ST_READY             0x80
#define ST_ERASE_MASK        0xee  /* bits to check after erase command */

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index