Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1528369ybl; Tue, 13 Aug 2019 14:20:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0Wj12akTpEry20b8lK/H8ePsCUuMet/hO6pbMiHJ0aLMLI/vdgl8p+mBY2vZtpwsBkVMB X-Received: by 2002:a17:902:381:: with SMTP id d1mr38700037pld.331.1565731232534; Tue, 13 Aug 2019 14:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565731232; cv=none; d=google.com; s=arc-20160816; b=x2VH2UwvsaR4ybHP32CbGW88698RjsJremH0O3XgNQiCLiSaJzxOkKaNcVN8KKnFRD 5aGh62wqTcfmdvH64S/aH6FrAbom1k1z4XpZDLQ82UaR0yYF2nUsPkvl4Gt7DO9UMyw4 9YKMjv+rlDgpm8GoblqYezrOPgrvjUf8uWTr369hgzyDKPrPZrvQWFqRrl7EvKN3tbFF RUNwnq0kZSBDG7xW9AM96bBaL6B67m4uaq7UI7gLckCNibq8ly3DHyRe9rDVVTAUsoXt AsIwyquDYgge4OD5uK7+SPLgQCYCqXg09v1x8QBJJ0KbxTct0AivAc2IEDy7B8dyLFaK 3fuw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=EFWQ4jRCEd8FDkIajgVLnR+9FJPAclCDJqxx4O3K6cM=; b=I//HFz40uO3uVbNDh1J9YV3a4FvXVgnTHnYpRSQ9wCsoMfZ/Hy0K3G/ttGcHqM/ufW 3BQ9wDYg0nsk8STNT+s9XTUoswFlQtNnf/k261XhQ/SgV3v/mlvn9qpkC6vU6cK4GI0Y 0leLqGD1tB1PXESBSHueTS9aAG1qsanQXu3YDDXGFfxE/dwUXjT20xWetVcaGvczVbI8 0LyBkI8XTZC/X4S0/885UfHo26ZJkwqH5pHcOa81bcLekWcVYSmIPAAVG2VyyQRmCrsl oR4JsRz0C0itHxYFfD8vqG/6NvY+UMHamqsQH2JeRi021z66TIJHUw023YYWdjNfQqBl rF3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=Uhqq6zLg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si67382898pfa.76.2019.08.13.14.20.15; Tue, 13 Aug 2019 14:20:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=Uhqq6zLg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbfHMVTa (ORCPT + 99 others); Tue, 13 Aug 2019 17:19:30 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:46004 "EHLO mail-qt1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfHMVTa (ORCPT ); Tue, 13 Aug 2019 17:19:30 -0400 Received: by mail-qt1-f169.google.com with SMTP id k13so10620348qtm.12 for ; Tue, 13 Aug 2019 14:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=EFWQ4jRCEd8FDkIajgVLnR+9FJPAclCDJqxx4O3K6cM=; b=Uhqq6zLgUzH8NOnI6um+OvZlJTV4BOdsi9we2uNC6K9kKPpRJ/fKLAXMTOND4i58/4 jUQeGgcoCwewV8FUpAKWd5CJPlt6G9tfZlDrFtQus00zfDwWbg19riTtLBj4XAqRG9Lj e6omlbWCvIA9q0rzQWEGDWrhCLNHK8xuAJ6t9XIY5ZxNghs4gn9Z4XhJmqcYQKxCFFK8 HYYOaE/MHrthxHR8PaeSXpgrGMAsBQAYCRtzxsprE/JjO4hWMx5D3pSxLzZGbxTfes33 uAIgEjcf+KZhxUqwgD07/+JNDvvmiutIWtHdbEpU4pSXxZLo/LHMK4n+w9Y2tWO8qM2r UqVg== 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:organization:mime-version:content-transfer-encoding; bh=EFWQ4jRCEd8FDkIajgVLnR+9FJPAclCDJqxx4O3K6cM=; b=scHqMHng09AAv1dH+/m+MtM8MO+CKZkoMPMGa306owEEJBzs/zwLaGnJy8Vrib5y/F GHPQSgNpEo5zO3qCh498BA+clG7ldSlptcFvB1+IMT1XAILBtl1L3m+eT3n3oAECEucT aicKEIG9Nb5d2wFzoribF+2hEmTUnS8HFLm4CoQBovRDVGUPF8N+bgzrCuX/TBsqTZUt JCVwI1GflTjJeTqtSb5umm9Atkp5CRSjQowzefmGWeXZJp0J1iPG/jP3IjqJOL3GumlI 7+Wn+2bDtvadFyWcu4CyYws8syxoaDY9gFHfcg74g7Oka+MJYpT/W8zhUATLPE3lFd2O V09g== X-Gm-Message-State: APjAAAUUhX8eoLX5TzKqyeFZUjxM+AYCR4jKvEG2A/E708yV+wE2M+uG oMLtsLrYIeTSbMdMJjISS1gLGQ== X-Received: by 2002:ac8:43c5:: with SMTP id w5mr35103972qtn.280.1565731169195; Tue, 13 Aug 2019 14:19:29 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id m38sm13989192qta.43.2019.08.13.14.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2019 14:19:29 -0700 (PDT) Date: Tue, 13 Aug 2019 14:19:18 -0700 From: Jakub Kicinski To: Jose Abreu Cc: netdev@vger.kernel.org, Joao Pinto , Giuseppe Cavallaro , Alexandre Torgue , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 07/12] net: stmmac: Add ethtool register dump for XGMAC cores Message-ID: <20190813141918.1601a649@cakuba.netronome.com> In-Reply-To: <3d860a78ce4e98941f7e292d251d7360755fdf2e.1565602974.git.joabreu@synopsys.com> References: <3d860a78ce4e98941f7e292d251d7360755fdf2e.1565602974.git.joabreu@synopsys.com> Organization: Netronome Systems, Ltd. 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 Mon, 12 Aug 2019 11:44:06 +0200, Jose Abreu wrote: > static void stmmac_ethtool_gregs(struct net_device *dev, > struct ethtool_regs *regs, void *space) > { > - u32 *reg_space = (u32 *) space; > - > struct stmmac_priv *priv = netdev_priv(dev); > + int size = stmmac_ethtool_get_regs_len(dev); > + u32 *reg_space = (u32 *) space; > > - memset(reg_space, 0x0, REG_SPACE_SIZE); > + memset(reg_space, 0x0, size); no need to zero regs, ethtool core zallocs them