Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3661070pxu; Sun, 11 Oct 2020 19:13:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi1qVerHorCegEiQjodXE+OlOF7Vcmhp2CuV0KKuYwXBoOKwqz4Cs1LhLAwDm2nz3j0tYv X-Received: by 2002:a17:906:3a1a:: with SMTP id z26mr24784493eje.519.1602468794354; Sun, 11 Oct 2020 19:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602468794; cv=none; d=google.com; s=arc-20160816; b=Rrhx6Sr1bc6kn00FbPRDijdNGWIwwkJgjbhvkgx+EPnRiM+b6jXjMtjHZ52Mq7ae4l IPz3/8/zVqA4O0N8TlC5BKImk2e9lfllettRulvzCNXA+DXAIOTwO0xw/RCVMP8/E/S/ oNY7iBJcfd0ATWvgSRkFbDYQABQUcAvjqGlGi7hQFfeVPzIOA6wZH71TsyNunsd6O5mG fKY8XC34pJO9g4Cjqu4cosYlQAP6THUlswKiVL2PEc04Ia9R6ncumKb7GE1hh64guWle 1PneCOVo6dNL5loPOA5Uav7C28d+s3Z0dzuaFCC/8cF4rnMxi3oGZWDslPdxwXTuxu8t s+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=v4MsclsAjBQ07tS6Y2k6AL+A2oNnHE0z2Kb1St2ZEIk=; b=bZKr9S8cgHZZMhceuAMtZ1/oUpCZR08zI28UPledolVKPpxOCsWHmikjLGyQvwETc6 un5mAOWLU7BVJmaOkTgHm0eBT/oyIKofgSuxrcPSVq0ypbutvcBGlw8VB28W7nstFFA5 CacHb7MZpwhZ9etzs2vg9pAaA1uXA14e0EoTStvm6iIgz5JLEPfAIHHNfm8jg+opL8pP YYT693uGs2QjRLylnVpeIIB8fiGS7M+eB4b8mp8+vufWZL89FL6+9oqPZtQjfBK+ugL9 J37M5rbwMtt/WYx9VxOoDiiSR+l974kKOY72UFoWChA77dvVho9mUk4uGlFmilFKLcvS hqMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="neCttq4/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si3390588edq.207.2020.10.11.19.12.50; Sun, 11 Oct 2020 19:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@gmail.com header.s=20161025 header.b="neCttq4/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728944AbgJKUTG (ORCPT + 99 others); Sun, 11 Oct 2020 16:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbgJKUTF (ORCPT ); Sun, 11 Oct 2020 16:19:05 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55EE6C0613CE; Sun, 11 Oct 2020 13:19:05 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id t21so14780037eds.6; Sun, 11 Oct 2020 13:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=v4MsclsAjBQ07tS6Y2k6AL+A2oNnHE0z2Kb1St2ZEIk=; b=neCttq4/0J3+3NTrhanFCgR56+zz6hfDnAOzM1dINwDLIuAqA3tMADIrgI6aUb+zAi +eW84mbUHzG1mA5KER0AFuvgMSlGeNFlSeYUrjL3m0dJOszx4WBDI7kWKXISNlENJhPD 050WWxG7qW9dQuQpk2PmuXO+528K82e7K89uJXuvnEVnilQvnYJVi757k2QQYxh4CVa5 Ed4GZZNn1vn+kv1i5dFESGPhlygVY4oDvkiD0PyxkFWDbCeb3YrRkppBbbm0d5WR0fxd tkkajfw+0ba0e9Nb5KjCCcTqY9wUM/LHdfNPLudLcRYIk6kS1/Eq5VLz1CoqDWXm0BU7 Hy7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=v4MsclsAjBQ07tS6Y2k6AL+A2oNnHE0z2Kb1St2ZEIk=; b=trTzE1LmGNkvCypiEmBtvOENyg2rmSNX8QaQ8pqO0Mf7QiPSd/uNFbF5tK2UBCU/XE LpnUVfA7NTsA2+bhyo84KKCMGI/DbDK6wWPQryvdh1EZKo6x+iw/G+67tyFVN76LQGRt BqrCjiu95k9OHty6PQVzwBaMPBCD6yMF0mN1ZXVlTgVDiENfhDBWhKN1AsgVvRBzHzdu lvQLkK8CGsnxnjrCZFJpLxOkk1kEwzE2v4C8fo/snFnfv+xqr4CuShqJ6qnJaEu9mbTc 8cM1rCKgpNT1+ZWWItuC4oS7MVxAfoql31+IYAaZtZchG/j4fxujwXcPBaAIHN9KIbkB 5FOw== X-Gm-Message-State: AOAM53205Y3oDDv0oguZ4t6nKvcJIuY4OyuzB084L5PnrjwGpWQX4MHR IcZSCajWAkKw21j8UP57Xl8= X-Received: by 2002:aa7:c98f:: with SMTP id c15mr10791684edt.200.1602447543892; Sun, 11 Oct 2020 13:19:03 -0700 (PDT) Received: from ?IPv6:2003:ea:8f00:6a00:51b7:bf4f:604:7d3d? (p200300ea8f006a0051b7bf4f06047d3d.dip0.t-ipconnect.de. [2003:ea:8f00:6a00:51b7:bf4f:604:7d3d]) by smtp.googlemail.com with ESMTPSA id l17sm9690345eji.14.2020.10.11.13.19.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Oct 2020 13:19:03 -0700 (PDT) Subject: Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats To: Stephen Hemminger Cc: David Miller , Jakub Kicinski , =?UTF-8?Q?Bj=c3=b8rn_Mork?= , Oliver Neukum , Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Roopa Prabhu , Nikolay Aleksandrov , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Alexey Kuznetsov , Hideaki YOSHIFUJI , Johannes Berg , Pravin B Shelar , Steffen Klassert , Herbert Xu , "netdev@vger.kernel.org" , linux-rdma@vger.kernel.org, Linux USB Mailing List , linux-wireless , bridge@lists.linux-foundation.org References: <5bb71143-0dac-c413-7e97-50eed8a57862@gmail.com> <20201011125412.3719926a@hermes.local> From: Heiner Kallweit Message-ID: <0a127353-4358-9664-6784-dec2c48e9b9d@gmail.com> Date: Sun, 11 Oct 2020 22:18:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201011125412.3719926a@hermes.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 11.10.2020 21:54, Stephen Hemminger wrote: > On Sun, 11 Oct 2020 21:36:43 +0200 > Heiner Kallweit wrote: > >> +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, >> + struct pcpu_sw_netstats __percpu *netstats) > > netstats is unmodified, should it be const? > >> +{ >> + int cpu; >> + >> + if (IS_ERR_OR_NULL(netstats)) >> + return; > > Any code calling this with a null pointer is broken/buggy, please don't > ignore that. > Thanks, I'll consider both points in a v2.