Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3152306imm; Fri, 20 Jul 2018 11:02:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8KiJagkyzYwjGD2CpQBSK3U3tdfjb21DqpdzEl7uq+fMRhqS/A5O/e013Ily6jU9Or3Ow X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr3053375plt.252.1532109741237; Fri, 20 Jul 2018 11:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532109741; cv=none; d=google.com; s=arc-20160816; b=1Hjdsy4s0HjUZX2qIBjcfRn6nhWAcD0SqAMwTQTTGeqlXvTzKxUNgy9XgtMYe69TtP IP337B9l3n4tSAgjXypbpkilmaa1/KRc3jAe5unhmTkRCSgFBe0BRowYyvwFxazvV2VK xo8BYE2M+wlGaXfqkBNZJTmPOZLq4HqF0QYri0KAZcfITIiTSEIpPVodzUS3U7mwN6bW JomyZC0+TAAiLfUsg4wMu5jQzb+zwFDCUb5xSh5bje0m+tB3Vg+EKxM/l9Rhck0QJQWA JhSETyb/NGUPoqn4FKZxhAkkKeuBFHcu4Tx03bDpbAWPGtVAgiLGpqUzC719I0gz+zVp 13OQ== 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=JyzMKWVOsPRonmu0ogVSRI0iQr9MPOBYA57FwZzx8Ggn21ouvlAbFcroTPiNcdqXC7 mkaLDr+k/5fGMXpL802pPXoaWGkgl/Jm2JiFL1kfxFE+QJ98jUvH6rrWNJY3oT+K4YIx CSY2uLHIKYIjGuRGIdCgVwg9okiPFMlXwajrEKs6FUkAQ8V9p8oWjN1ONr1MWVnCOQqX c6cOsK9UbBCBX/FAnl4dOSoVERt9Olw8kFtFnBUoefLmpZf6/CT2+yCnADefyI95j9FG eW5o47NFUXrSjflkft4uWK9gVeMuRVuk6zBHEbP53CAPHKrWYXy4koK1s/yP+78x1fQv FxHw== 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 u30-v6si2325354pfl.87.2018.07.20.11.02.06; Fri, 20 Jul 2018 11:02:21 -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 S2388342AbeGTSuG (ORCPT + 99 others); Fri, 20 Jul 2018 14:50:06 -0400 Received: from ale.deltatee.com ([207.54.116.67]:38364 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388317AbeGTSuF (ORCPT ); Fri, 20 Jul 2018 14:50:05 -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 1fgZhn-0008E1-0U; Fri, 20 Jul 2018 12:00:42 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fgZhk-00012n-NT; Fri, 20 Jul 2018 12:00:36 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Doug Meyer , Logan Gunthorpe Date: Fri, 20 Jul 2018 12:00:27 -0600 Message-Id: <20180720180034.3964-2-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180720180034.3964-1-logang@deltatee.com> References: <20180720180034.3964-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, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, dmeyer@gigaio.com, 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 v2 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