Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1669301ybh; Mon, 20 Jul 2020 04:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkIavWBdR5HCMhXSciuXO6Thz7NKQowralLD3OCYOzzjA4yNRsrJU3wFEEE+3DiklmSdPL X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr21708451edb.307.1595244306112; Mon, 20 Jul 2020 04:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595244306; cv=none; d=google.com; s=arc-20160816; b=OBwElN2IkG7AWGHyhu3oSLfW4Rep2TwdzQDNIzIPtkBYVYzG2R7UdP3zLVJMV5lUde QX87kWQYwAVvYPKeXEl4mSxLhgC2mWEqk5NZPnNEb+leY6Wopu0YX/fa6IiCxSLL7kTB PSmS1zeZlySbdrDEI7lFuvWS4T4F9ww+/gWl1QE7w64pL5LObrx77TgXTbzuXxC86sqi ZdvBin6LtWP3Qm80WinexiUtjGrqLda8TWxbpTS3uz7ueXQLzG3Hj/2hjl0huazlUUAj LIOh5UrUVqZs6quKYdTjy1bd4nFjK2iPYP5MsPhauxPqkT6acwDm1kGSTvWMlXCWCQ44 Ns1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=K0O8tYf5mLOBgvQTZMl4F2IjBP9jWBNjkkwy1BkXTFw=; b=izmEVfpx8uGLf5FpzlqgJ0h+fLd9O/v6audygiHJ7wODz459aIOV/S0m/y8OzLTsss 0o0kOy8GJcXN7/nW6XkWI8+KBeEB9Tw0yfIlvbpPYN2Vri6q4cowsEsUKLfJR75ZBL7W jStkBjphgWfa9zoxh/pPc9N8vJKQBYIL8u2710idbsLJB0uvyXapq+X+Qc6xOpdwhwKD xFe4RiHyVj0O3X6smYIaOUVJBOAK9dy1o6UUeIUDgZrGZ7O5YBpBTG1dPgWM1mzfIT9B Ak138bjvG1DI5QAYs8RUGQDCmR+Gnq3Dgp1pZzw8AqRIf57g14xBTxSTa/ex6qolW6Ln 6C2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e13si10137894ejx.153.2020.07.20.04.24.42; Mon, 20 Jul 2020 04:25:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728567AbgGTLYe (ORCPT + 99 others); Mon, 20 Jul 2020 07:24:34 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8336 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728558AbgGTLYe (ORCPT ); Mon, 20 Jul 2020 07:24:34 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D0FC462189A9EEA39C96; Mon, 20 Jul 2020 19:24:30 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 19:24:24 +0800 From: Xiongfeng Wang To: , CC: , , Subject: [PATCH] net-sysfs: add a newline when printing 'tx_timeout' by sysfs Date: Mon, 20 Jul 2020 19:17:49 +0800 Message-ID: <1595243869-57100-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by: Xiongfeng Wang --- net/core/net-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index e353b82..52bafb8 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -1108,7 +1108,7 @@ static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf) trans_timeout = queue->trans_timeout; spin_unlock_irq(&queue->_xmit_lock); - return sprintf(buf, "%lu", trans_timeout); + return sprintf(buf, "%lu\n", trans_timeout); } static unsigned int get_netdev_queue_index(struct netdev_queue *queue) -- 1.7.12.4