From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C55FA00C2; Wed, 5 Oct 2022 21:28:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F163442670; Wed, 5 Oct 2022 21:28:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1186240DFB for ; Wed, 5 Oct 2022 21:28:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664998128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MrEPapYG7BlwhRZqqQLSR1hwxTc+4xQAwsBwljDA7XI=; b=gQFazfCXS6Wn37aeeXD9mJl/JA6GSIRJugoRsTQA6qPATI5ax/LA+zWlivoALMwiCz2nou 7cTqIdpwhsI6X+JqI3qjIse8W2LeANZG97cSnJKxZbOuORvtnjgmwh93VloqS7PooqtXIZ kutO5Y3+Zz+eeb8gP8JZe0UexIy44Sk= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-628-g2l2TONCN8uiCem1wczwFQ-1; Wed, 05 Oct 2022 15:28:47 -0400 X-MC-Unique: g2l2TONCN8uiCem1wczwFQ-1 Received: by mail-pf1-f199.google.com with SMTP id h1-20020a62b401000000b0056161cd284fso6111117pfn.16 for ; Wed, 05 Oct 2022 12:28:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=MrEPapYG7BlwhRZqqQLSR1hwxTc+4xQAwsBwljDA7XI=; b=gRgSClMi63t1rIFkm8qg70jQSSUtIKM48vId73YQd/kCoEZgw9/+gbf3lLCL+/MRbP CBT/6kOqnV9OjflcCMN8MBI58t772o4jG/VvgPQZ4NZtJx40u4pj9KzLpdR4G+kzf5r7 KS8Ksb7x6ak1JdMy/CNcwypL8DbuseF3y4J13iOBBJeVvaM04rFQTa0U/tu/10zKQgqh 4HmVpPaECiPyLAgpUe671cTvbX+rn4C8s3002HI4Mk3ocWKSfsCRbwVghEEjbXAgaHgA 4M7ms6iVjHLYMmWbLtYJN2tzyB7w8deh93nbbg2MUIOGqncB5VZQ4CTjSUhA8HN/74bI yG2g== X-Gm-Message-State: ACrzQf3Rv+hPhGb//Wzp6n2S25aoMBkCDU0FBAH4CzNA9r7ofKzVGKV6 RIwSNNF3UTv7Rsklee7Gi1X9kCwFij54CTbCVRptdBlIimiYdSMWuiGft3FKztg52C88APzEHQj 7wgoX8BuWtpErlIZK2jA= X-Received: by 2002:a63:5b58:0:b0:452:2ba4:f86b with SMTP id l24-20020a635b58000000b004522ba4f86bmr1105916pgm.223.1664998126289; Wed, 05 Oct 2022 12:28:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6W4Uk6R+GY1IM4fhTGfN/SxtmSAPDOOlMhRWkq8QohC9tBoYW/W/fkmPB1Q2xlR01hCPK/bGjYjQ+Fc7lpy0c= X-Received: by 2002:a63:5b58:0:b0:452:2ba4:f86b with SMTP id l24-20020a635b58000000b004522ba4f86bmr1105894pgm.223.1664998125974; Wed, 05 Oct 2022 12:28:45 -0700 (PDT) MIME-Version: 1.0 References: <20221004111811.1502920-1-thomas@monjalon.net> In-Reply-To: <20221004111811.1502920-1-thomas@monjalon.net> From: David Marchand Date: Wed, 5 Oct 2022 21:28:32 +0200 Message-ID: Subject: Re: [PATCH] net/qede/base: fix 32-bit build with GCC 12 To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org, Rasesh Mody , Devendra Singh Rawat X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Oct 4, 2022 at 1:18 PM Thomas Monjalon wrote: > > A pointer is passed to a macro and it seems mistakenly referenced. > This issue is seen only when compiling with GCC 12 for 32-bit: > > drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25: > error: array subscript 1 is outside array bounds of =E2=80=98u32[= 1]=E2=80=99 > {aka =E2=80=98unsigned int[1]=E2=80=99} [-Werror=3Darray-bounds] > 1418 | ecore_wr(dev, ptt, ((addr) + (4 * i)), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1419 | ((u32 *)&(arr))[i]); \ > | ~~~~~~~~~~~~~~~~~~~ > drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17: > note: in expansion of macro =E2=80=98ARR_REG_WR=E2=80=99 > 1465 | ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords); > | ^~~~~~~~~~ > drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35: > note: at offset 4 into object =E2=80=98pData=E2=80=99 of size 4 > 1439 | u32 *pData, > | ~~~~~^~~~~ > > Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0") > Cc: stable@dpdk.org > > Signed-off-by: Thomas Monjalon Reproduced and tested build fix. Tested-by: David Marchand --=20 David Marchand