Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp501303ybh; Tue, 21 Jul 2020 00:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9V+qQoX4TqOeoy/YwH4+Fh/fM4UOAW9yjuHTr9f2+87PWmXUC++alXXekgF9LPA3xrPdu X-Received: by 2002:a05:6402:1a42:: with SMTP id bf2mr23692079edb.292.1595315433711; Tue, 21 Jul 2020 00:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595315433; cv=none; d=google.com; s=arc-20160816; b=C2zMuaZ1jzpz1iEBEe8KCu/pwcG60o+FIkKzTpa2KGXbgMsK60Z7KoupSJMbSAr6+u ay8SCHxJBAa7DA1twl5wzIGBHAKk2OHpPe1A3ZkvjcMqpLJPlNy4FljZgUfct5a9cgZq RWN9mX2dsf1bfj6Nh/DQr3yE70NLo+9pus7vjxO4KARy4Xw0NdMJlB4HDqhq1/5hGdzm 6/5RuM9Qrtlw1RouKp1Yl8Z34noR2TN4uptmovRZpdSxzvK3mmfT/3iue7TVYGdEMQX+ V28U10i9uiUhoXf0CuYipKPfynA+IuCG5hENWhHP1EnpmYqn2zSniPBDV9eGxAkSau6b lQkg== 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=AuH4sXR7gBvoCfhWDU3IcH6An+xSBI8O6085QH45bqo=; b=KBc5o1enDdQA4HCFl/QS5H2cd0OjAXUfFOkU0z4xSBeNUt1di3jfmmO4Sou3eedBHv 6b6Mn+Jk+1L6bM3FicyuAXS3L872uQCbCw+NsVwACMeRoybxSpq1gGb2bKsbfqMpmADK mDcefXZZ9UXIRHTpiVXpHlJgul5X1XkCFPtakgpklhuwp9mBFhAPp0mRDydqC2gaXYAs kISroa9jyB15XazzjI5w3QxycjWyvdeQriaVxA+D5y7VBvXZxnRlVkADIXI6A4ID1giJ TcchEOiVBN4cUO1uSSOf+u5TUolNsOik+5uZ3dL6XEzYOukXhT0t97l02jWe8yyU38PN OJkQ== 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 m15si11399413ejr.38.2020.07.21.00.10.10; Tue, 21 Jul 2020 00:10:33 -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 S1728550AbgGUHJr (ORCPT + 99 others); Tue, 21 Jul 2020 03:09:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8341 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726039AbgGUHJq (ORCPT ); Tue, 21 Jul 2020 03:09:46 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 520625E64979C2EEB907; Tue, 21 Jul 2020 15:09:42 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Jul 2020 15:09:34 +0800 From: Xiongfeng Wang To: , CC: , , Subject: [PATCH v2] net-sysfs: add a newline when printing 'tx_timeout' by sysfs Date: Tue, 21 Jul 2020 15:02:57 +0800 Message-ID: <1595314977-57991-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..7bd6440 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, fmt_ulong, trans_timeout); } static unsigned int get_netdev_queue_index(struct netdev_queue *queue) -- 1.7.12.4