From patchwork Wed Feb 23 14:00:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1596700 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=fail reason="signature verification failed" (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=l0mBEZC7; 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 (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3d4t04RHz9sG7 for ; Thu, 24 Feb 2022 01:01:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4B0883CA3; Wed, 23 Feb 2022 15:01:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="l0mBEZC7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2972C83C36; Wed, 23 Feb 2022 15:01:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 6D18E83BA2 for ; Wed, 23 Feb 2022 15:01:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x632.google.com with SMTP id lw4so52653337ejb.12 for ; Wed, 23 Feb 2022 06:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2Y92esir/1H5TXcDxxKXkeudyxIIqh2L2TRxuG65YjQ=; b=l0mBEZC7kDHvAAop1dD9G6pZtw6CEHHhB/5K5Cg8Oga61P5Nk0L+6Ct99SS+S6uLny E3NY22U6r/RN4neG5TvguNRCru/JLqYcRPinz6x9evB568aCFRjtbpeBAguPMsWzubvC VYO/Qo6U8ESoeHB1Gy9tJJw2EEQ4fpZzVTauytj58moZyJ3FmfqIe1KUkgLXCQyvbTfo PbnDVIXVbVZaGLmpTDSRYp85Z9c+9x5b07HlgCSWKFP1+8cR1gaoULive1FJJ9Sh+mjt nUES5RZVbkTPwb8rVA6O29nhjjK6QEAFrUm6bADggJJPfOGPyBimrJNeTISQBSrSzBZX H8kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2Y92esir/1H5TXcDxxKXkeudyxIIqh2L2TRxuG65YjQ=; b=b5fDpsc5T22yS9+Q9m1cbqvVamtKbB8SyD2kaQ1B1Wy4a6BvVTCQcleYapn0ZkZB74 bjQNoq8tYsJgCXEqA3BBD78SUjU9q3LiVIrvXMVf8aGUdLUVlEUVoSrkUnZeSIU+AFqX T1Hl7TWl+o8EhcVrprRogwdCV6wI7aYB1Vx7UyNVlrzTQ5ppMvUIerbqmmY77n1ZYmrs uyz3dnBanmXx41fq0GFdIBPeVN+PruB+J9MjaZxonMajIeQrr1dlBMRUEQuZ08opYj4O MCr5X76nlbsWoOwHBlFcZ7a/7pccEkBuJAzAym3rjEYLv5pvAmnlVylpQEiSa5Wbfvy7 I/Ug== X-Gm-Message-State: AOAM533/I+UnAwz9p+32U91ODRm4UVHl5RNhgX9zPSj4aGMfgT50tVo2 rJwsda2OAB2OmtANqEMZh20rDIVS865n8Q== X-Google-Smtp-Source: ABdhPJxKf9paFrrj6foBt8wRKq8+JGVhPOZYGY5K1zb3sQzeutrw+wIlsbVwRdzC/5SzeXeqL/TKfQ== X-Received: by 2002:a17:906:1f11:b0:685:d50e:3bf9 with SMTP id w17-20020a1709061f1100b00685d50e3bf9mr23372041ejj.275.1645624865790; Wed, 23 Feb 2022 06:01:05 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id hs25sm7529541ejc.172.2022.02.23.06.01.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Feb 2022 06:01:05 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma Subject: [PATCH 1/4] fru: ops: Clear fru table before storing data Date: Wed, 23 Feb 2022 15:00:56 +0100 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: 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 From: Ashok Reddy Soma Fill fru table with 0's before using it, to avoid junk data. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- board/xilinx/common/fru_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c index 6ed63bb7ee11..a0a1441a8eef 100644 --- a/board/xilinx/common/fru_ops.c +++ b/board/xilinx/common/fru_ops.c @@ -222,7 +222,7 @@ int fru_capture(unsigned long addr) } hdr = (struct fru_common_hdr *)addr; - + memset((void *)&fru_data, 0, sizeof(fru_data)); memcpy((void *)&fru_data, (void *)hdr, sizeof(struct fru_common_hdr));