#2239 closed defect (fixed)

i2c/spi-sd-card.c:920: bad expression ?

Reported by: David Binderman Owned by: Sebastian Huber <sebastian.huber@…>
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

[rtems/c/src/libchip/i2c/spi-sd-card.c:920]: (style) Expression '(X & 0x600000) == 0x40000000' is always false.

high_capacity = (reg & 0x600000) == SD_CARD_FLAG_HCS;

Something like

high_capacity = (reg & SD_CARD_FLAG_HCS);

might be better.

Change History (3)

comment:1 Changed on 01/23/15 at 10:25:20 by Sebastian Huber <sebastian.huber@…>

Owner: set to Sebastian Huber <sebastian.huber@…>
Resolution: fixed
Status: newclosed

In 2f16001d984b917dd726298431de214e67d36b8d/rtems:

libchip: Fix high capacity detection for MMC

Close #2239.

comment:2 Changed on 01/20/17 at 14:22:22 by David Binderman

Doesn't look fixed to me. I am now getting

src/c/src/libchip/i2c/spi-sd-card.c:920]: (style) Expression '(X & 0x6000000) == 0x40000000' is always false.

(X & Something with six zeros) == Something with seven zeros looks somewhat doubtful.


comment:3 Changed on 01/20/17 at 14:29:41 by Sebastian Huber <sebastian.huber@…>

In 7fbd72cb005c7d7dff692ed174f903587e3c21e4/rtems:

libchip: Really fix high capacity detection

Update #2239.

Note: See TracTickets for help on using tickets.