Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3981172pxb; Mon, 27 Sep 2021 07:00:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRkEOC2tEnBzbTD2Lc28WlOllOHAntywJGavP/P1efyUfxhAujKb57qnuDGg3fU0Bt7yxZ X-Received: by 2002:a17:90b:4b8f:: with SMTP id lr15mr20035342pjb.163.1632751259664; Mon, 27 Sep 2021 07:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632751259; cv=none; d=google.com; s=arc-20160816; b=FAOagGlOUS5aKYNBcX2mJYSEXamCmx9tTg1XmhU4ymoJ5xLyXk5Pn7kINjjyXSilgd eu1YonbGkiaiudIpUrFOTa6SbsvHzD1srMgirAjRO1bPTMmmP++7ljTOZBGD9JThSSgR DdsrCy9jqZbmFU3FdLoZclT/zphCqcs4sUX97WOR45eKPIpoUtf9goQoxriCIVx4A56X 1a4lM+jBIZkA+2OmuuMYU3J19u6ihUjJQiKOBbG8EhFAoQJ0KSFOh53NaormSYUJMflj Nt2D9OVMZkRBvedUYUvs/Ie07l7PwXdcOhmXHBHmmUkzP/Vx8INbfK0tzjmyTxToQrFv rKLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RrTMeWNLhXhV3Nmlhq3UV6iPJsGUZRJfAkd64HkMlvA=; b=w59+vbDXjjGiCfDekCW87MuCZc6RzUIpWc7+SBH/uVvmC0WoI5ihHPrngSHFsP3nPT ZQwfwz72+oea/vo2hC06XdjjHonsMYwqJk5lZDSrsXY6OuAjcoA1BQaUwcsdfEXngzYd 3aIFxmLQjbTz5g+JGLJYEYrhzc/c1epzZZ9J+s3f7fpfC2/77+f84zu59cSfaVpzu/fj BUKJXj/xryiqoVK6lGNVBd3xqSuhzNY+fUkKI3Jw/Rq2byOS1Xx2DrbUTJFAT7wHHzWN GdV+tZQ0Fa7JD3TWhn+wJGeA3KmUGT4UuzjzmcWpMBup7Zao8QvTQ/spsiYacOktEyBR tf8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V4J8G6Zy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w28si15816515pfj.304.2021.09.27.07.00.45; Mon, 27 Sep 2021 07:00:59 -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=@kernel.org header.s=k20201202 header.b=V4J8G6Zy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234695AbhI0OBZ (ORCPT + 99 others); Mon, 27 Sep 2021 10:01:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:47508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234645AbhI0OBW (ORCPT ); Mon, 27 Sep 2021 10:01:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D7766113D; Mon, 27 Sep 2021 13:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632751185; bh=1hp8qFDQ8yPjRo6lqUmnO1LLloukCmviTPPP63/he9k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V4J8G6Zyb2WmImS9SMfWVn5CwMbimsGXU4BItbY19fjJ5NgUvb18pN3whaKoCr6vx DwOfWAunSvo/tTkMsJSlfccIJ8rdtp7YEYxkhVXetcHObFa93qo65w6vsaZA3uKh7R Iy2zMLkSt0mClHJWcOjhuvrg5aUMO+zKqz17+JPY8kR2MzOgfCFkY7zhPGHOCyueEe rDbGkGa8xv6Y/Ds2MEPYXT22AWSdwmo3gYhkdUHWu6jugu1zdsMwZTgmLUFEMqX8Os enRTnUULyaqjw1OH2N49fxJDZ1RvnzpVmCoUdqeaSAZJP7EP1AR6xMJcCILilbaQVh zEFsnX5KW9mSg== Received: by mail-wm1-f49.google.com with SMTP id r83-20020a1c4456000000b0030cfc00ca5fso663634wma.2; Mon, 27 Sep 2021 06:59:44 -0700 (PDT) X-Gm-Message-State: AOAM5314jIOA8UHRPF7zGvczfpEO53oPMF7/PsbACE9n6utZZLx6UChT DEAjYD1OkSYOzNQC8a1lymi+C41V+0LIjtz+MHA= X-Received: by 2002:a05:600c:22d4:: with SMTP id 20mr3768656wmg.82.1632751183501; Mon, 27 Sep 2021 06:59:43 -0700 (PDT) MIME-Version: 1.0 References: <20210927100336.1334028-1-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Mon, 27 Sep 2021 15:59:27 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [RESEND] net: stmmac: fix gcc-10 -Wrestrict warning To: "Russell King (Oracle)" Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Voon Weifeng , Ong Boon Leong , Arnd Bergmann , kernel test robot , Dan Carpenter , Networking , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 3:27 PM Russell King (Oracle) wrote: > On Mon, Sep 27, 2021 at 12:02:44PM +0200, Arnd Bergmann wrote: > > This looks rather weird. rx_irq[] is defined as: > > int rx_irq[MTL_MAX_RX_QUEUES]; > > If "i" were to become MTL_MAX_RX_QUEUES, then the above code overlows > the array. > > So while this may stop gcc-10 complaining, I'd argue that making the > new test ">=" rather than ">" would have also made it look correct. Indeed, thanks for pointing this out. I have sent a follow-up with that change now. Arnd