Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3971180ybn; Fri, 27 Sep 2019 14:13:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5IXuFwO7MQcmQayeVdeKivaPraI7EGrwGoh+fMN/oYor4S9zYu2m6bniqjRSYM/8KitOg X-Received: by 2002:a17:906:493:: with SMTP id f19mr9487868eja.285.1569618835249; Fri, 27 Sep 2019 14:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569618835; cv=none; d=google.com; s=arc-20160816; b=VJPnJqCAnQOiz02VQG6SADqWoYneCa+YqGX1Jd0wIw1eyupRT6JEWO0GYkqYr6eT+1 SYZ/eNifXOJ5K7dVhsDGTisKH2CKXGFkyC66bRcrWv5POoQ1IswDEbg0kgooOkidxM5u 7n7XYRobiNwOaoVmzAJyDGeXKenV8hOUnaAD9suIJKH1HcVQqQIRj9FTeB7Qxjrn8J5W SdKqzbHFqOp65Qd9lNhReJrZ2MqFtBkHV4KO442O6Lz2g4ey3DmOY2jBk+0FGmobVLYK Dy6VzMxFGQLRvE4J5WB7ZrlqI6ANXSmOlFzU+YA+2VqAbWJ2Ocfve2RHMBwxkb9gS/1v /Q1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MT3rEIfaJgpzvHmFM2pWeqN2XOEfjsN3Ht7YF+hthq8=; b=m0Z6y0ZIgU0Vkfy76hnvUaPCEZx3kMGmMnC3u1qv1RRzOKHdwWDWuGNEhptwxaFQEd oCaX6McS1YHtb6YZJe+i6HmVpl0uNGkffk/eKSvb7DYXW3JFXUFJa0bxbQZcKJxh70ZN F/7lWSBS0gm41OvTmp6LNIcvABFCjwItTFpXH9PV1OE3duv6xG2VQxuh+zDkPMgQiEoQ JnqNoRj75oSLqx6PGOZkSni7wpZTqyjwzg3qMWi/QwaiiVgcbgNraJ2EaZF0/vHvzSbc 458P8G5fhMA28NeQDChQBSSb6U478Zgjk0iHbEE9Zz99Lw6NUNxfR22M7VHE3XrwvM7h 8XXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HWrjXwmy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si2325837edu.432.2019.09.27.14.13.30; Fri, 27 Sep 2019 14:13:55 -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=@google.com header.s=20161025 header.b=HWrjXwmy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728208AbfI0VMf (ORCPT + 99 others); Fri, 27 Sep 2019 17:12:35 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41094 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbfI0VMf (ORCPT ); Fri, 27 Sep 2019 17:12:35 -0400 Received: by mail-pg1-f194.google.com with SMTP id s1so4102392pgv.8 for ; Fri, 27 Sep 2019 14:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MT3rEIfaJgpzvHmFM2pWeqN2XOEfjsN3Ht7YF+hthq8=; b=HWrjXwmyGQrWIktNn2lCfS/WWNp3jM0GJkqLaICHIq/FPWxfdSodtSpyQmZZZSqYKl gLWJ5uiWHrbfp7XRrlbm5tcLBi0mF8wxUQGVBvHdC+YrHRlTUWjnN/4obhqljgrPTG3A RZtBAyLun1kMIfwj+XzanCaE7pfz5X+1U1DEEWl4a0HFqU4UC+8fia7u1zVDsy87zqmM aCnZO4WYMlXyBvwTDY5YzycIIMk8vbQav6mKwEUaLZN6qC6Wase6y5kT8waFE/KYHjR2 sI+xNuy9ZVIQOG/d3gqTWFx/1AYoGsrnH4KQyKPBRTWgKQPqX7caUSWi/ZiuXFXkwHDR u2xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MT3rEIfaJgpzvHmFM2pWeqN2XOEfjsN3Ht7YF+hthq8=; b=WfoEWlqBdThbPJxcvlekfMQLedP81HHLaobtt9JzOZObgVg2p9xVHex97o6+KXCl/X 3hEokENMjocfot70XiF0jitrjKDZXVgw95aZJNPCQwEZDPbis4jmIm/KSCVN3HSH5YBS cNVkaj+R4XE07gk4K7yrkpWO20rTJyCT1Rp8CE8Q1BlPqQ5dcM8mBnisKWSIHdbvDE8a +L6kJTXzAOixfm2g39G8A93XJaXf8lE+5YE2LmPTqNMq/r+p+evsxQnwlmmlSPXuj26x 76RgZP2U7TNZUx6PYZn7BSSORu4p6LtnfD0nz/cDTIe519+NJfV/9kCGBcbKPofARYK6 Re5Q== X-Gm-Message-State: APjAAAXFpfslCETWyR4LeMSdtQU9gZWpUZ4MSIdHItL/DuVXJ1KXCRq9 jlhnnqRoIePTjFh8DSNUqfJP8aZStgNx+ywQ11fC2Q== X-Received: by 2002:a62:798e:: with SMTP id u136mr6912504pfc.3.1569618754157; Fri, 27 Sep 2019 14:12:34 -0700 (PDT) MIME-Version: 1.0 References: <80dd26ecf7fc82c88dc378d78210df5dd4138812.1569569778.git.Jose.Abreu@synopsys.com> In-Reply-To: <80dd26ecf7fc82c88dc378d78210df5dd4138812.1569569778.git.Jose.Abreu@synopsys.com> From: Nick Desaulniers Date: Fri, 27 Sep 2019 14:12:23 -0700 Message-ID: Subject: Re: [PATCH net 8/8] net: stmmac: xgmac: Fix RSS not writing all Keys to HW To: Jose Abreu Cc: Network Development , Joao Pinto , Giuseppe Cavallaro , Alexandre Torgue , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, Linux ARM , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 27, 2019 at 12:49 AM Jose Abreu wrote: > > The sizeof(cfg->key) is != ARRAY_SIZE(cfg->key). Fix it. I think the warning was from -Wsizeof-array-div. > > Reported-by: kbuild test robot > Reported-by: Nick Desaulniers I may have reported the kbuild link, but scanning my email, there's also a report from Reported-by: Nathan Chancellor > Fixes: 76067459c686 ("net: stmmac: Implement RSS and enable it in XGMAC core") > Signed-off-by: Jose Abreu > > --- > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > Cc: Jose Abreu > Cc: "David S. Miller" > Cc: Maxime Coquelin > Cc: netdev@vger.kernel.org > Cc: linux-stm32@st-md-mailman.stormreply.com > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: Nick Desaulniers > --- > drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > index 6d8ac2ef4fc2..4a1f52474dbc 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > @@ -533,7 +533,7 @@ static int dwxgmac2_rss_configure(struct mac_device_info *hw, > return 0; > } > > - for (i = 0; i < (sizeof(cfg->key) / sizeof(u32)); i++) { > + for (i = 0; i < (ARRAY_SIZE(cfg->key) / sizeof(u32)); i++) { cfg is an instance of struct stmmac_rss, which looks like: 125 struct stmmac_rss { 126 int enable; 127 u8 key[STMMAC_RSS_HASH_KEY_SIZE]; 128 u32 table[STMMAC_RSS_MAX_TABLE_SIZE]; 129 }; yep, LGTM. Thanks for the patch. Reviewed-by: Nick Desaulniers > ret = dwxgmac2_rss_write_reg(ioaddr, true, i, cfg->key[i]); > if (ret) > return ret; > -- > 2.7.4 > -- Thanks, ~Nick Desaulniers