Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3898085pxv; Tue, 13 Jul 2021 06:26:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLIPt+A+hCgnfBQiTBHQumElgh3BtVgz3lLGYRUN3XeEhWq33LiFVfGRkqCjjXdavgEyqc X-Received: by 2002:a05:6602:2245:: with SMTP id o5mr403721ioo.20.1626182768047; Tue, 13 Jul 2021 06:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626182768; cv=none; d=google.com; s=arc-20160816; b=0F5gCuPa29uiSR6sI9Tvj1QNb0izq8552B49fnDmoYrNoIzc5Fs7Riv9QvrLEAJpky 0IsL5Ef+0hNkAzcooKzriu2+f9KunSWYBfJ4Qj5efPX/KGmJF98HCdFkXjd2FCF3kbTV jDGarx3boVWfXeh5hwYB2Ic+1wgKkbfrB7CrUbcyBVRYLdN2o9xtcllUZ8Bk6NqBnGxB TrXrS9S6gsHmKLSZB9zw4YvaJLhoEjvT+XLfPa02z+dC+XP5f0hlUTj3P+uQI1BW9oEy /4S45P3xj7R4eGbN3yB2g1jN4P7xdJv0KnZtx80kjMOaFkdf1qt2tevsIFvTIdTcUmie Zirg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=jgImV5lDtzOU/4Ozn0Pepwsu6kVjkzMXFrQpmXM9B/Y=; b=LJBI3HhJ79nLPMoMpB5P/0Bx1xhqwXQKkQCqRqwLDO2lgzuENeM9Yqy+fmED4W+h4q ncHJ7ovLoUiMdfH4/XA6t+AAkYFtfHtn1PTx8/lC8bjWnyP4R9uwYRKUt3Xkf+0Pt/+i ESI4EeGQFoCyi5U13rBxkgLsEixhczAAuK08nnKM+gYu17Y0HfpzduGwTv9O2XYlZmzd tUZYIjxatRnA1nSNLnFJ4o67j6GCTzqaFTaM9BkU8KPE/VECAq9JnRnqj1nBU6dtZOkN 8Nna+L6K3DkTDjb+lOajEftiGtxqldRttdtGvcnMZVj9V7lacM9ClV4SFaUtQqCot649 wmiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p1mvoMvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si11149841jak.113.2021.07.13.06.25.54; Tue, 13 Jul 2021 06:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p1mvoMvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236484AbhGMN2A (ORCPT + 99 others); Tue, 13 Jul 2021 09:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236222AbhGMN17 (ORCPT ); Tue, 13 Jul 2021 09:27:59 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C32C0613DD; Tue, 13 Jul 2021 06:25:08 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id p9so12125074pjl.3; Tue, 13 Jul 2021 06:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=jgImV5lDtzOU/4Ozn0Pepwsu6kVjkzMXFrQpmXM9B/Y=; b=p1mvoMvp4mvqswdbZNS5xjzN1dpNtfUKbZQjX3d36BDJIX063CJDSWMGynLk32Dpcl HzxaCudHVV6YCXcu7sOe4FwtSu/cGO2/z/W7OdON9BmfHuK498X1sUuKbw3Xu54zSLX7 1ISKiWufCV41WlFLzyJdcdybJqi+/oTO5UADMY3rkujHRDJmN5pOJL7ZkDJaFg4bd0GD U6wuEEtlQwVf54TCTt5Z0/R8RN+G9Xq7626CFHsjoMWgTIWLZ7DjiI9JMMBYUpfkd9LY xxKFEkqYVa3SxO/4hCt+BUtVCQYkDK3NXlLnXDGyhN0S2bS/fiQ0XJMe89nOxxoFF4/E Q5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=jgImV5lDtzOU/4Ozn0Pepwsu6kVjkzMXFrQpmXM9B/Y=; b=NomjAphcQqFXoeEFW3jDNcUroGmhgS/Sq71RQX2qPhiZgSA9Byyy/vAxdMoN81z0Ad WVSkPSIgwrsK4IPzyEburiq1Dw8DGCtDFC/dS/RWIh9QohX+/p/BY/twdrOr7PWGxqUJ pu3JCKy5OVb2izr4rZjR8iCxO3ambtueapvl3NSTh4F+rqHcEHdrTlo70U+SlMb6xuZv EQ//iSNQwzA8E8JZjvLp7RcPFMgch8v/S+55h+znHs+Uq0XahHpymGM9EGqlNgauph6C ElPcxyV7S/gghk/Tsf/SNBB7D3J3O1evgaH0xeC7FaHxjZ4PbR2cSlv6pFCvgnspqpU3 UXzw== X-Gm-Message-State: AOAM531PFA7MnnltR7PEx8bwpwNSM8Vw7nPKHbcQxjZdy5acfSy3uj+4 bCzaCwAgeoDECIQFrH38qGDFZ0RSDg7Q X-Received: by 2002:a17:90a:5a4d:: with SMTP id m13mr4222530pji.7.1626182708070; Tue, 13 Jul 2021 06:25:08 -0700 (PDT) Received: from [10.109.0.6] ([45.145.248.64]) by smtp.gmail.com with ESMTPSA id m19sm9631952pfa.135.2021.07.13.06.25.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 06:25:07 -0700 (PDT) Subject: Re: [PATCH] tools: PCI: Zero-initialize param To: Leon Romanovsky Cc: bhelgaas@google.com, kishon@ti.com, lorenzo.pieralisi@arm.com, kw@linux.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210627003937.6249-1-yang.shunyong@gmail.com> From: Shunyong Yang Message-ID: <26dbd10a-3d4e-032a-ec56-3eddac5eb4aa@gmail.com> Date: Tue, 13 Jul 2021 21:24:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi,  Romanovsky, On 2021/7/11 19:56, Leon Romanovsky wrote: > On Sun, Jul 11, 2021 at 09:48:17AM +0800, Shunyong Yang wrote: >> Hi, Bjorn and Kishon, >> >>   Gentle ping. Would you please help to review and merge this tiny change? >> >> Thansk. >> >> Shunyong. >> >> On 2021/6/27 8:39, Shunyong Yang wrote: >>> The values in param may be random if they are not initialized, which >>> may cause use_dma flag set even when "-d" option is not provided >>> in command line. Initializing all members to 0 to solve this. >>> >>> Signed-off-by: Shunyong Yang >>> --- >>> tools/pci/pcitest.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c >>> index 0a1344c45213..59bcd6220a58 100644 >>> --- a/tools/pci/pcitest.c >>> +++ b/tools/pci/pcitest.c >>> @@ -40,7 +40,7 @@ struct pci_test { >>> static int run_test(struct pci_test *test) >>> { >>> - struct pci_endpoint_test_xfer_param param; >>> + struct pci_endpoint_test_xfer_param param = {0}; > You can simply write {} instead of {0} - zero is not needed. > > Thanks    Will change as you said. Thanks. Shunyong. >>> int ret = -EINVAL; >>> int fd;