Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp431040ybh; Mon, 20 Jul 2020 21:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt1lJx5HlFzVpo6wFN8LTNbO6jru1FRlqqT8gFEBYmGaNQpCoEmBirmaDTF367b1epUmGl X-Received: by 2002:a17:906:240d:: with SMTP id z13mr23200258eja.346.1595306812385; Mon, 20 Jul 2020 21:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595306812; cv=none; d=google.com; s=arc-20160816; b=qIKfheRoVx6aSkl8Zb/74HpZKxiarDwGzDpiO9T85wKvHWsfIcqOlik0skA25IQwBZ CDOHudwPW+BsfqRiPMS7D/BbCqanjyh89/+D3+Y0YIglpDUUDA0dT+NeYKhCE5/Jly8D XkFSk7Wlrvrelugp0kYDQ2arRKVetOAtzTeDQ4nLm1jr6SbrcZVOJDZo5UU5M/LorePw GwEdG6eZyp2ELw5xiTLK/pHBqdqW5HSx//3lipPG4sxpG0OgnXW4nSaXtsceJxysUwLT 0CBo3xU54UnoGZp3skMEARIfV0ltIAuOb/duO0RM4RfNTwShAeOPkuqbH5iJxOS2/RG7 Wr1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZihfE8PdTkcmFog/NE9+3wOqDTSKN/yPTD5RUiTCo78=; b=HUa3+Qvj6CTJli62WMHlWsohJVY7blZrtJo+KbjavdJomDTO0HlraYhAyIAouw/l+2 O7oi0AptRfSRoIv2F6wqUXDq9XX6Rx90KFBDoMPiy/EWY4wDbmbcqJVJpjZC7yixVYUK y6aQjNBz42wbh8p/XcT2xyCkBEShGcTdVVb4NHXr0xQlJM2FHpAXvKRuwdAtiOS3Zkul GT6yaImafWO+AwqtjAgJRxjh/C4V6RfrkcC0vpV/1DfO43F4PNh1SoOpd8zbcFOtB7OQ UAMRAsPIcwx8I+1iVR9wlr0SAx8waUpkIYDvG358HC3fGz8Shb9QQddSIQwAad0T769g Et2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b="T2UjdX/a"; 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 d19si11504555ejj.468.2020.07.20.21.46.29; Mon, 20 Jul 2020 21:46:52 -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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b="T2UjdX/a"; 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 S1726029AbgGUEqI (ORCPT + 99 others); Tue, 21 Jul 2020 00:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbgGUEqH (ORCPT ); Tue, 21 Jul 2020 00:46:07 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05D37C0619D6 for ; Mon, 20 Jul 2020 21:46:07 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id j19so11349148pgm.11 for ; Mon, 20 Jul 2020 21:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZihfE8PdTkcmFog/NE9+3wOqDTSKN/yPTD5RUiTCo78=; b=T2UjdX/aBACNNI7AsLQjD7SodT7yMVIiZtg+gM7ReuX0a9g3/anzmj5Sy0T7rk7aTL TWJYwrxOPJ7WxwdJJ4Ez+FxDL++sED71D1PI+CaLd4FnofQovWaciZtcwQ07Ak9b+lCr e6jjHDCkxPu/Awzud68wB04RT50d/YR9p6cUTD0uV3IVxvF0dVp0L+JDS4hbcs8gVtLK uULi+DH4czQJlXGMesPcjetG+xIZZ2vl7/pK6qMquqOkqMNL+mu2W6QjGe70JjD0I97W qu+ZEyZ1I3D3Zhqhi3Py/gK3lk6vTVeWNA7OR44LLWz5O3oYVe50gTHzT3mEDLvCELCl 9oFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZihfE8PdTkcmFog/NE9+3wOqDTSKN/yPTD5RUiTCo78=; b=BZRtheih79/sUML1SPAzCaWzl/+f5OQOf/MPKy9pcS0+usYN3/N9rYvj0nmglbk1UA jg1Q8dUAaYRb/JjwsXC0FobN9LpT4cEMcG/9A+wJ0nxQexZJ9x3L/+SPQqDd6BwtqIRq UlG3K8DBB318zCnoeRTnV4cWnME8suWPAw6ny4A4xNBoOnbCkSHjsss0ER5wTWU9Unnh tqRg5EyAopT0s7CNqK0cuIaTcOzjhnJrBexJSilRjoWQAot47Hzlqh9/9BmP9c3A0yA5 kU+J8TL6guoOqwtgquGSLThqBMbHLPnIwLTG526J8qbd/7w+bTKWJqWRh76wnH+I878Q 0ewA== X-Gm-Message-State: AOAM531xcJ4j6CutFrov8DgRfEvPU86W96IB4uXpSHCp7PF4SV2I5uw0 YD1qKAvb6j7DBYHg3+gylk5tAA== X-Received: by 2002:aa7:9a92:: with SMTP id w18mr22555654pfi.233.1595306766376; Mon, 20 Jul 2020 21:46:06 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id az13sm1270078pjb.34.2020.07.20.21.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 21:46:06 -0700 (PDT) Date: Mon, 20 Jul 2020 21:45:57 -0700 From: Stephen Hemminger To: Chi Song Cc: David Miller , Haiyang Zhang , KY Srinivasan , Stephen Hemminger , "wei.liu@kernel.org" , "kuba@kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 net-next] net: hyperv: Add attributes to show TX indirection table Message-ID: <20200720214557.0b711a3c@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Jul 2020 03:50:00 +0000 Chi Song wrote: > +static void netvsc_attrs_init(void) > +{ > + char buffer[4]; > + int i; > + > + for (i = 0; i < VRSS_SEND_TAB_SIZE; i++) { > + sprintf(buffer, "%02u", i); > + dev_attr_netvsc_dev_attrs[i].attr.name = > + kstrdup(buffer, GFP_KERNEL); > + dev_attr_netvsc_dev_attrs[i].attr.mode = 0444; > + sysfs_attr_init(&dev_attr_netvsc_dev_attrs[i].attr); > + > + dev_attr_netvsc_dev_attrs[i].show = tx_indirection_show; > + dev_attr_netvsc_dev_attrs[i].store = NULL; > + netvsc_dev_attrs[i] = &dev_attr_netvsc_dev_attrs[i].attr; > + } > + netvsc_dev_attrs[VRSS_SEND_TAB_SIZE] = NULL; You know that last line is unnecessary. The variable is static and starts out as all zero. Overall looks good. Acked-by: Stephen Hemminger