From patchwork Fri Jan 8 00:19:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12005465 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC45C433E0 for ; Fri, 8 Jan 2021 00:21:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88AE923716 for ; Fri, 8 Jan 2021 00:21:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729514AbhAHAVp (ORCPT ); Thu, 7 Jan 2021 19:21:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729250AbhAHAVp (ORCPT ); Thu, 7 Jan 2021 19:21:45 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8211AC0612FB for ; Thu, 7 Jan 2021 16:20:33 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id j16so9551963edr.0 for ; Thu, 07 Jan 2021 16:20:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uRun+cwgSl0Uw/asLb1EObRtOH80zeClR0Pwl3YmkHI=; b=lQmftUq733BT0lhBJBTNGZ04z1SVnTfncqOVawiUXgMq5HCnOMeja1w3Lh/xu8NRDh P3tWqhSGO3kFhX63MMRODItVZHHFIIS1oRCXzKAI3gj5nW3HC6J7lhK4b/u4ZaHgm8k4 /JhfT3iqb3CN/QIdMDSNN5VRon6gFNJ8nLEaqw4kBvVCz6GmOC9dKUjXOPcatdiSwmSC 6IX7HhAC+zMH+VlYNOTCebqvFMx8ZNiO9ACWS/xSGi/aukhfwoWzbBtLvzlkxIV8H8c2 R/R76pcgEZUHYXCT479rd73IpK3tRIpWbfG3PIAxXjtJ8vcTsFFo93rk9DqV3esSu1zM zZ8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uRun+cwgSl0Uw/asLb1EObRtOH80zeClR0Pwl3YmkHI=; b=efXnSNTs53ZmycJ6Y0qd44yAeA3wfd5wSNv+Id8DmSdcI2ZevOrIIn6V96w5XoaBWQ NJgSameUanwYoWl0Def+ib9yc1DWgJ0XJL0VE6M4b5m2UiAiG85dgynqtbBpxvf9N5Bm uT5KUrnpZWN2Iz/PjuJqIL+0wxneClrVadNH/jxCtJoW5UR5KFroCf0a0smIBgDLmX8M j5S1OAwbzcuVLJ/qhIvbYyxFcAUdtnZB71NPehYG/OM6ExFHkUOsxo7+d5EhMHLKVv5Y bstmGcE8HGxfVAxEWtrZz9VrUW+bzcnigR/nOvxdSmg7NWfRmsCp0eaDmr+X1ox4S9/T gwFg== X-Gm-Message-State: AOAM531VK3rbwoeF1lr+MrdeMti+9bmhDQu7YSRLoE4WGQR/0dh9Bd25 uAoUWl+BTVJiKV0vykov7Is= X-Google-Smtp-Source: ABdhPJxfOgTeqlBX+2nY1IT0njzfYir5V+RSDqFWBnvOsNS0q3shbSUZiMbhU4J7+nlq4SKcB/CT+A== X-Received: by 2002:a05:6402:366:: with SMTP id s6mr3391011edw.44.1610065232171; Thu, 07 Jan 2021 16:20:32 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id rk12sm2981691ejb.75.2021.01.07.16.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 16:20:31 -0800 (PST) From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , Nikolay Aleksandrov Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , Cong Wang , Stephen Hemminger , Eric Dumazet , George McCollister , Oleksij Rempel , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , Arnd Bergmann , Taehee Yoo , Jiri Pirko , Florian Westphal Subject: [PATCH v4 net-next 06/18] parisc/led: reindent the code that gathers device statistics Date: Fri, 8 Jan 2021 02:19:53 +0200 Message-Id: <20210108002005.3429956-7-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210108002005.3429956-1-olteanv@gmail.com> References: <20210108002005.3429956-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vladimir Oltean The standard in the Linux kernel is to use one tab character per indentation level. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Vladimir Oltean --- Changes in v4: None. Changes in v3: None. Changes in v2: None. drivers/parisc/led.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 36c6613f7a36..3cada632a4be 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -359,16 +359,19 @@ static __inline__ int led_get_net_activity(void) /* we are running as a workqueue task, so we can use an RCU lookup */ rcu_read_lock(); for_each_netdev_rcu(&init_net, dev) { - const struct rtnl_link_stats64 *stats; - struct rtnl_link_stats64 temp; - struct in_device *in_dev = __in_dev_get_rcu(dev); - if (!in_dev || !in_dev->ifa_list) - continue; - if (ipv4_is_loopback(in_dev->ifa_list->ifa_local)) - continue; - stats = dev_get_stats(dev, &temp); - rx_total += stats->rx_packets; - tx_total += stats->tx_packets; + const struct rtnl_link_stats64 *stats; + struct rtnl_link_stats64 temp; + struct in_device *in_dev = __in_dev_get_rcu(dev); + + if (!in_dev || !in_dev->ifa_list) + continue; + + if (ipv4_is_loopback(in_dev->ifa_list->ifa_local)) + continue; + + stats = dev_get_stats(dev, &temp); + rx_total += stats->rx_packets; + tx_total += stats->tx_packets; } rcu_read_unlock();