From: Michal Simek Date: Mon, 6 Jun 2022 07:31:27 +0000 (+0200) Subject: xilinx: fru: Replace spaces with \0 in detected revision X-Git-Tag: v2022.07~32^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93216276f532c9eed2126860a678a6b4d77dc358;p=platform%2Fkernel%2Fu-boot.git xilinx: fru: Replace spaces with \0 in detected revision Also fix board revision field where spaces are used instead of \0. The same change was done for board name by commit 530560b6f8eb ("xilinx: fru: Replace spaces with \0 in detected name"). Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/e069e5134e57899e859786ad8ba48721df6df752.1653911444.git.michal.simek@amd.com --- diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 5be3090..629a6ee 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -245,6 +245,10 @@ static int xilinx_read_eeprom_fru(struct udevice *dev, char *name, } strncpy(desc->revision, (char *)fru_data.brd.rev, sizeof(desc->revision)); + for (i = 0; i < sizeof(desc->revision); i++) { + if (desc->revision[i] == ' ') + desc->revision[i] = '\0'; + } strncpy(desc->serial, (char *)fru_data.brd.serial_number, sizeof(desc->serial));