Commit 972ea17a authored by Borislav Petkov's avatar Borislav Petkov

amd64_edac: Drop local variable

Use the macro directly instead
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent 71d2a32e
...@@ -1233,7 +1233,6 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range, ...@@ -1233,7 +1233,6 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range,
u64 chan_off; u64 chan_off;
u64 dram_base = get_dram_base(pvt, range); u64 dram_base = get_dram_base(pvt, range);
u64 hole_off = f10_dhar_offset(pvt); u64 hole_off = f10_dhar_offset(pvt);
u32 hole_valid = dhar_valid(pvt);
u64 dct_sel_base_off = (pvt->dct_sel_hi & 0xFFFFFC00) << 16; u64 dct_sel_base_off = (pvt->dct_sel_hi & 0xFFFFFC00) << 16;
if (hi_rng) { if (hi_rng) {
...@@ -1250,7 +1249,7 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range, ...@@ -1250,7 +1249,7 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range,
*/ */
if ((!(dct_sel_base_addr >> 16) || if ((!(dct_sel_base_addr >> 16) ||
dct_sel_base_addr < dhar_base(pvt)) && dct_sel_base_addr < dhar_base(pvt)) &&
hole_valid && dhar_valid(pvt) &&
(sys_addr >= BIT_64(32))) (sys_addr >= BIT_64(32)))
chan_off = hole_off; chan_off = hole_off;
else else
...@@ -1265,7 +1264,7 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range, ...@@ -1265,7 +1264,7 @@ static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range,
* else * else
* remove dram base to normalize to DCT address * remove dram base to normalize to DCT address
*/ */
if (hole_valid && (sys_addr >= BIT_64(32))) if (dhar_valid(pvt) && (sys_addr >= BIT_64(32)))
chan_off = hole_off; chan_off = hole_off;
else else
chan_off = dram_base; chan_off = dram_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment