diff options
author | 张忠山 <zzs213@126.com> | 2019-04-09 17:56:53 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-10 08:25:04 +0200 |
commit | fd074a7a7961af9db076f2b82ccb9d9ba2a63f43 (patch) | |
tree | b709492df9076ec077ad97c2c47d09f469acad16 | |
parent | 05e69a1b693c1a661a04c4d7bf4ac929c3c8fa22 (diff) | |
download | barebox-fd074a7a7961af9db076f2b82ccb9d9ba2a63f43.tar.gz barebox-fd074a7a7961af9db076f2b82ccb9d9ba2a63f43.tar.xz |
ddr_spd: Fix mod_ranks test
((x & 0x10) == 1) can never be true. Test for the bit at 0x10 instead.
Signed-off-by: 张忠山 <zzs213@126.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/ddr_spd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ddr_spd.c b/common/ddr_spd.c index 0ba5eaceae..23df3e7119 100644 --- a/common/ddr_spd.c +++ b/common/ddr_spd.c @@ -325,7 +325,7 @@ void ddr_spd_print(uint8_t *record) printf("Error module type\n"); printf("%-48s ", "DRAM Package "); - if ((s->mod_ranks & 0x10) == 1) + if ((s->mod_ranks & 0x10) != 0) printf("Stack\n"); else printf("Planar\n"); |