From patchwork Mon May 30 11:50:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1636891 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=xKZyBrxS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LBYdt0Y67z9s07 for ; Mon, 30 May 2022 21:51:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA62A842A8; Mon, 30 May 2022 13:50:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="xKZyBrxS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16811842C9; Mon, 30 May 2022 13:50:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9979380818 for ; Mon, 30 May 2022 13:50:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x633.google.com with SMTP id l19so2467513ejr.8 for ; Mon, 30 May 2022 04:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=u06Ebz9gznP5tWGKF4Scy5I99pKFNBvBda3zM6krWmA=; b=xKZyBrxSajmoOaVdoUobQkIBneUqYKrTPlS2/ZYSkdH/icHxWvTy5ZQb9avzPUL6BX LtHh5/mwSAki38CrDWuYawaXAXWphGvdq0vrduAgxya9Sh/z1d3zaFTWxanb6tv0nLRT U9NUgQu1LOIy9pDzM+u86PZYFCkbRmOZyobR+iP5dDzBvOiaoK94L1xe4c6uFQZBEFEn XqquyJ49XQ6RzjYOHPhigXExb+8NPX9HcXVt0owcRB4goTakUeI5wqGkV1W66Fi9/J/h 3ZzOiwazcGjM9FOzM1JROwUgFPe4hCGPnCtA60gIjk+/3b2bdlb1MkCYhR8PqCWyC8a5 2Cog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=u06Ebz9gznP5tWGKF4Scy5I99pKFNBvBda3zM6krWmA=; b=P+JoE6bqHzUsNvhe8fbDMewP1A57/n6Ky64EwjQwAX+DFKvyCuXHSygsKt8NgwtgHk yE9Tr+qXv9vrmMZz2GQm6DG5tmeOT9qFH+xmcJ4mn0pJ8J3qDZJDIcKFkvdZ6uL6qISu 5fSqPDzQi5KuE/9nvJHuv+ADMJtan1r0zI5pDGrOffkhKbsbYOd5f5Khf5hX2jK1cB7S lY7fKURsEIkE0aZcVnIkijcEZjRt2P5S5TBfGAnkUmcVewKqPxCNTouAJKELkQayYbOH HCbJAqjL0SRrBboB6eF7HqgrUV/99hXywaG6p+xLY5HJ5D1SPa6tdwPmKpkqJTZpAnv5 Ff9A== X-Gm-Message-State: AOAM532Jd15+ekQPKFFkwKtJQZNWRbgdOOFK9DgGqFv3dDlGPHIroSEq dQ1OPBeXiMYcZhUQdWmi31O+D90NqMe+5w== X-Google-Smtp-Source: ABdhPJypfFNIG4SF1n9NsBwqKYWbSoS79nCUGb0pljh+9+5nI2EpcFcuPQg+XAF7/gTuuTJ57C2VAw== X-Received: by 2002:a17:907:94c8:b0:6fe:7ef5:c6e9 with SMTP id dn8-20020a17090794c800b006fe7ef5c6e9mr48180648ejc.183.1653911453993; Mon, 30 May 2022 04:50:53 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id b2-20020a50ccc2000000b0042dd482d0c4sm1171472edj.80.2022.05.30.04.50.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 04:50:53 -0700 (PDT) From: Michal Simek X-Google-Original-From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, ilias.apalodimas@linaro.org Subject: [PATCH] xilinx: fru: Replace spaces with \0 in detected revision Date: Mon, 30 May 2022 13:50:45 +0200 Message-Id: X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- 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));