Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1460297imm; Fri, 8 Jun 2018 17:11:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLsnSSvZFCgMPRzMBjgZ0ZQT2nC3aHInD/oER9mCxeptp5D8cCuWD2fNHZabuk8iLS6JNP8 X-Received: by 2002:a65:4545:: with SMTP id x5-v6mr3521673pgr.4.1528503075715; Fri, 08 Jun 2018 17:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528503075; cv=none; d=google.com; s=arc-20160816; b=j/Yce0A8j1zy5bwSnenBqfLCRAm42s791fbqgCx00sFH71ooMbAhLLUdVDeiCuYEKf TwdPv3xJYJ05Tahc9QVufEmdrlOGlF+qQbdLteQQsHncI+yNXPWcmo//HqVAEDsuJewa msxyko/ZnlkaWBzjMZFKHdOi2gTiopkt9Y2/jEBGNXh4OrjTt8wKwgBApGx7mATpZAEz 3snJcA/gFGAVp1rmGjPGqhR8jqagGGS/BN8Taohm0GJl6NCJyxa7MwE/D3G7zmZEdjJt DwU1JWgYQ+Jwnm0IL1vUIXTtavMbztSmAQyVWc6Jv5FGqt27Qu3/OlmEUCQyAPqImlLe WfQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=SwbRU2NlfKfRXaVwHcD6VKkHWD/lacOvR78ZBw8mdnQ=; b=ZIR14nsBNvAkEnN3leFEREYdbSWvL6IfGu1VE3Wt67aa1/24GPEtdRf6eQSGHcBcwW /owZH0BQXfPEeTOInr2f6g6/TJXDuUQ4H06NtxjLjwl+Yb94Q2WHtEk1g+9VOXUsUfSG DrM08OeEkJ74BTuKUlTGox/iS3Tuu+Lb7sWTJ6F17I7+EzyJ47KlRoNCzI81t6fjH/20 yRCXXkXb5wgooIPuMrujlW2RWsYsuqeP0nYkB+ibcH9HcloMh4eiqw5Jo3BZnv3BWl5d ERHy9/COcizuxeiyzsy43Nn42PXiNvhvNakbFGovjZk+To5A8Gx0NNJehtCvmwKxxVOD YqjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 124-v6si13833832pgi.425.2018.06.08.17.11.01; Fri, 08 Jun 2018 17:11:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284AbeFIAJb (ORCPT + 99 others); Fri, 8 Jun 2018 20:09:31 -0400 Received: from ale.deltatee.com ([207.54.116.67]:60570 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753094AbeFIAI1 (ORCPT ); Fri, 8 Jun 2018 20:08:27 -0400 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fRRQd-00043n-2R; Fri, 08 Jun 2018 18:08:26 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fRRQb-0003cn-HY; Fri, 08 Jun 2018 18:08:21 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com Cc: Jon Mason , Dave Jiang , Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Logan Gunthorpe Date: Fri, 8 Jun 2018 18:08:11 -0600 Message-Id: <20180609000819.13883-2-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180609000819.13883-1-logang@deltatee.com> References: <20180609000819.13883-1-logang@deltatee.com> X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.1 Subject: [PATCH 1/8] NTB: ntb_tool: reading the link file should not end in a NULL byte X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When running ntb_test this warning is issued: ./ntb_test.sh: line 200: warning: command substitution: ignored null byte in input This is caused by the kernel returning one more byte than is necessary when reading the link file. Reduce the number of bytes read back to 2 as it was before the commit that regressed this. Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe --- drivers/ntb/test/ntb_tool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c index d592c0ffbd19..ec5cf095cdb9 100644 --- a/drivers/ntb/test/ntb_tool.c +++ b/drivers/ntb/test/ntb_tool.c @@ -504,7 +504,7 @@ static ssize_t tool_peer_link_read(struct file *filep, char __user *ubuf, buf[1] = '\n'; buf[2] = '\0'; - return simple_read_from_buffer(ubuf, size, offp, buf, 3); + return simple_read_from_buffer(ubuf, size, offp, buf, 2); } static TOOL_FOPS_RDWR(tool_peer_link_fops, @@ -1690,4 +1690,3 @@ static void __exit tool_exit(void) debugfs_remove_recursive(tool_dbgfs_topdir); } module_exit(tool_exit); - -- 2.11.0