Attention is currently required from: Angel Pons.

Angel Pons uploaded patch set #4 to this change.

View Change

sandybridge,haswell,broadwell: Use DIV_ROUND_CLOSEST macro

Integer division in C truncates toward zero. When the dividend and the
divisor are positive, one can add half of the divisor to the dividend to
round the division result towards the closest integer. We already have a
macro in commonlib to do just that, so put it to good use.

Tested with BUILD_TIMELESS=1, coreboot images for the Asus P8Z77-V LX2
and the Asrock B85M Pro4 do not change.

Change-Id: I251af82da15049a3a2aa6ea712ae8c9fe859caf6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
---
M src/northbridge/intel/haswell/haswell_mrc/raminit.c
M src/northbridge/intel/sandybridge/raminit_shared.c
M src/soc/intel/broadwell/raminit.c
3 files changed, 4 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/52651/4

To view, visit change 52651. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I251af82da15049a3a2aa6ea712ae8c9fe859caf6
Gerrit-Change-Number: 52651
Gerrit-PatchSet: 4
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Rudolph <rudolphpatrick05@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Martin L Roth <gaumless@gmail.com>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-CC: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: newpatchset