Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1348637pxy; Sun, 1 Aug 2021 22:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybmQcoEevpQDxIxeaJRcL4wMbmMwjnJWekeY9TjwfVbKDf/KUWnPbJU9OfVbxIP2fagsuy X-Received: by 2002:a05:6e02:550:: with SMTP id i16mr608564ils.207.1627881268642; Sun, 01 Aug 2021 22:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627881268; cv=none; d=google.com; s=arc-20160816; b=LZ+V5earR7fq9/agHi1IiayTLUu8CeozNaJvKyCDBLeA/oS5/emT2kROcpZDPYBaXc yAiqGW/JOdzFx6ySKjzBt/Mf0sXF6kUFiM6O9X1iBhELWXYQt3Tt7ssrey0BWK61v4lT Yqwmf6oWhJ80iM5xv4R2uR8eMLoboP31A0W+MCYxmX/QzklqWwMsHyQmhg9BetWae1rF WhVl0zOHeSQi3jQWFsIp7uz2NlorQne61C+u1H2haSBwOkURrHd5+uHYBlNvd0KNsiD2 PZVsFFW38skXmyHpTTzeZQsitYzZPmjievIysqs4sgUNhGPiDVOa5zoWE47oCTbe+s4J /wNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RnEQXFeJRHcqEq37cWoAYuL8aZw025YjRcrt8VZWKyc=; b=X+6+sOwNfc5iNfOfnUDdHlJEMW+i1u5BjAnswXSD0dTjD2WHBCZycN80+rPUtFu2Ec XZLLqZaa+X1kyMDgenAAUgCBqHkRmdWJjWu5a11YpW0mYs/PIbDkCoqNdEnICogUPzZX a7z2toOPmJfUj5ZAW+OI+ys8q0/cjiy92EwjNfWqmT42B9olO8exuKTfKQE1AluMDdvf j2Criwe2yDXKKi9mbYO3ygMUzrFL+dby2WeLE/N54wnsQMRtJr5tFxYIyQaaJzAZUxjF aB2IqMznNQ16EBpRzkwsPt93YmHRzpNoWo1aSjfFAWPVk0xao+So3Nqu1jdh2Cpiqju7 if5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dQS3gYOD; 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=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si10689862ion.84.2021.08.01.22.14.17; Sun, 01 Aug 2021 22:14:28 -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=@linux.dev header.s=key1 header.b=dQS3gYOD; 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=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbhHBFKE (ORCPT + 99 others); Mon, 2 Aug 2021 01:10:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbhHBFKE (ORCPT ); Mon, 2 Aug 2021 01:10:04 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43071C06175F; Sun, 1 Aug 2021 22:09:54 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1627880992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RnEQXFeJRHcqEq37cWoAYuL8aZw025YjRcrt8VZWKyc=; b=dQS3gYODbcm7tTDAL8XbHi5112o/kp1kGM/i133Iz4yx2zCwyON+BjKRz08uJvUPW3d+a3 kcxIB+40LqU5m25MNfMuw49F/LqC9ebOwqsa3e947c7v/275LQ5nVKULAYku3gc8fbK+vz 5JvyhCLVc1R0hM5WaXbvYdYt2DNjTL4= From: Yajun Deng To: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yajun Deng Subject: [PATCH net-next] net: Keep vertical alignment Date: Mon, 2 Aug 2021 13:09:37 +0800 Message-Id: <20210802050937.604-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: yajun.deng@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Those files under /proc/net/stat/ don't have vertical alignment, it looks very difficult. Modify the seq_printf statement, keep vertical alignment. use seq_puts() instead of seq_printf(), avoid the warning. Signed-off-by: Yajun Deng --- net/core/neighbour.c | 7 ++++--- net/ipv4/route.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index c294addb7818..c018a27fc36b 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -3315,12 +3315,13 @@ static int neigh_stat_seq_show(struct seq_file *seq, void *v) struct neigh_statistics *st = v; if (v == SEQ_START_TOKEN) { - seq_printf(seq, "entries allocs destroys hash_grows lookups hits res_failed rcv_probes_mcast rcv_probes_ucast periodic_gc_runs forced_gc_runs unresolved_discards table_fulls\n"); + seq_puts(seq, "entries allocs destroys hash_grows lookups hits res_failed rcv_probes_mcast rcv_probes_ucast periodic_gc_runs forced_gc_runs unresolved_discards table_fulls\n"); return 0; } - seq_printf(seq, "%08x %08lx %08lx %08lx %08lx %08lx %08lx " - "%08lx %08lx %08lx %08lx %08lx %08lx\n", + seq_puts(seq, "%08x %08lx %08lx %08lx %08lx %08lx %08lx " + "%08lx %08lx %08lx " + "%08lx %08lx %08lx\n", atomic_read(&tbl->entries), st->allocs, diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 04754d55b3c1..68ca0e4072c1 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -276,12 +276,13 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v) struct rt_cache_stat *st = v; if (v == SEQ_START_TOKEN) { - seq_printf(seq, "entries in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n"); + seq_puts(seq, "entries in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n"); return 0; } - seq_printf(seq,"%08x %08x %08x %08x %08x %08x %08x %08x " - " %08x %08x %08x %08x %08x %08x %08x %08x %08x \n", + seq_puts(seq, "%08x %08x %08x %08x %08x %08x %08x " + "%08x %08x %08x %08x %08x %08x %08x " + "%08x %08x %08x\n", dst_entries_get_slow(&ipv4_dst_ops), 0, /* st->in_hit */ st->in_slow_tot, -- 2.32.0