* [PATCH] xilinx: fru: Replace spaces with \0 in detected revision
@ 2022-05-30 11:50 Michal Simek
2022-06-06 7:31 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2022-05-30 11:50 UTC (permalink / raw)
To: u-boot, git, ilias.apalodimas
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 <michal.simek@amd.com>
---
board/xilinx/common/board.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 5be3090c3186..629a6ee036ff 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));
--
2.36.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xilinx: fru: Replace spaces with \0 in detected revision
2022-05-30 11:50 [PATCH] xilinx: fru: Replace spaces with \0 in detected revision Michal Simek
@ 2022-06-06 7:31 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2022-06-06 7:31 UTC (permalink / raw)
To: U-Boot, git, Ilias Apalodimas
po 30. 5. 2022 v 13:50 odesílatel Michal Simek <monstr@monstr.eu> napsal:
>
> 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 <michal.simek@amd.com>
> ---
>
> board/xilinx/common/board.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
> index 5be3090c3186..629a6ee036ff 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));
>
> --
> 2.36.0
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-06 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 11:50 [PATCH] xilinx: fru: Replace spaces with \0 in detected revision Michal Simek
2022-06-06 7:31 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.