util: Remove extra newlines in log messages

Print adds a newline implicitly. Simply remove the extra newlines.

BUG=None
TEST=Build zork, observe build log

Change-Id: Idb150c12c90719ba1465e7e7fe45c26d456e2a1c
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43786
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rob Barnes 2020-07-23 17:25:52 -06:00 committed by Patrick Georgi
parent 4aea6915a0
commit 4d2db06ab5
1 changed files with 7 additions and 7 deletions

View File

@ -99,7 +99,7 @@ def inject(orig, insert, offset):
def main(): def main():
args = parseargs() args = parseargs()
print("Reading input APCB from %s\n" % (args.apcb_in.name)) print("Reading input APCB from %s" % (args.apcb_in.name))
apcb = args.apcb_in.read() apcb = args.apcb_in.read()
@ -107,10 +107,10 @@ def main():
gpio_offset = apcb.find(GPIO_MAGIC) gpio_offset = apcb.find(GPIO_MAGIC)
assert gpio_offset > 0, "GPIO magic number not found" assert gpio_offset > 0, "GPIO magic number not found"
print('GPIO magic number found at offset 0x%x\n' % gpio_offset) print('GPIO magic number found at offset 0x%x' % gpio_offset)
gpio_array = (args.board_id_gpio0 + args.board_id_gpio1 + gpio_array = (args.board_id_gpio0 + args.board_id_gpio1 +
args.board_id_gpio2 + args.board_id_gpio3) args.board_id_gpio2 + args.board_id_gpio3)
print('Writing SPD GPIO array %s\n' % gpio_array) print('Writing SPD GPIO array %s' % gpio_array)
apcb = inject(apcb, pack('BBBBBBBBBBBB', *gpio_array), gpio_offset) apcb = inject(apcb, pack('BBBBBBBBBBBB', *gpio_array), gpio_offset)
spd_offset = 0 spd_offset = 0
@ -130,7 +130,7 @@ def main():
"Unexpected channel number found in APCB" "Unexpected channel number found in APCB"
print("Found SPD magic number with channel %d and dimm %d " print("Found SPD magic number with channel %d and dimm %d "
"at offset 0x%x\n" % (spd_ssp.ChannelNumber, spd_ssp.DimmNumber, "at offset 0x%x" % (spd_ssp.ChannelNumber, spd_ssp.DimmNumber,
spd_offset)) spd_offset))
dimm_channel = (spd_ssp.ChannelNumber, spd_ssp.DimmNumber) dimm_channel = (spd_ssp.ChannelNumber, spd_ssp.DimmNumber)
@ -155,12 +155,12 @@ def main():
assert len(spd) == 512, \ assert len(spd) == 512, \
"Expected SPD to be 512 bytes, got %d" % len(spd) "Expected SPD to be 512 bytes, got %d" % len(spd)
print("Enabling channel %d, dimm %d and injecting SPD\n" % print("Enabling channel %d, dimm %d and injecting SPD" %
(spd_ssp.ChannelNumber, spd_ssp.DimmNumber)) (spd_ssp.ChannelNumber, spd_ssp.DimmNumber))
spd_ssp = spd_ssp._replace(SpdValid=True, DimmPresent=True) spd_ssp = spd_ssp._replace(SpdValid=True, DimmPresent=True)
else: else:
print("Disabling channel %d, dimm %d and clearing SPD\n" % print("Disabling channel %d, dimm %d and clearing SPD" %
(spd_ssp.ChannelNumber, spd_ssp.DimmNumber)) (spd_ssp.ChannelNumber, spd_ssp.DimmNumber))
spd_ssp = spd_ssp._replace(SpdValid=False, DimmPresent=False) spd_ssp = spd_ssp._replace(SpdValid=False, DimmPresent=False)
spd = EMPTY_SPD spd = EMPTY_SPD
@ -170,7 +170,7 @@ def main():
spd_offset += 512 spd_offset += 512
print("Fixing checksum and writing to %s\n" % (args.apcb_out.name)) print("Fixing checksum and writing to %s" % (args.apcb_out.name))
apcb = inject(apcb, bytes([chksum(apcb)]), 16) apcb = inject(apcb, bytes([chksum(apcb)]), 16)