[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240329131857.730c6528@kernel.org>
Date: Fri, 29 Mar 2024 13:18:57 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Dmitry Safonov
<0x7f454c46@...il.com>, Heiner Kallweit <hkallweit1@...il.com>,
nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] netdev_queues: fix -Wshadow / Sparse
shadow warnings throughout the file
On Fri, 29 Mar 2024 18:00:00 +0100 Alexander Lobakin wrote:
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: warning: declaration shadows a local variable [-Wshadow]
> 1992 | return netif_txq_maybe_stop(nq, IDPF_DESC_UNUSED(tx_q), size, size);
> | ^
> ./include/net/netdev_queues.h:137:11: note: expanded from macro 'netif_txq_maybe_stop'
> 137 | _res = netif_txq_try_stop(txq, get_desc, start_thrs); \
> | ^
> ./include/net/netdev_queues.h:92:7: note: expanded from macro 'netif_txq_try_stop'
> 92 | int _res; \
> | ^
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: note: previous declaration is here
> ./include/net/netdev_queues.h:133:7: note: expanded from macro 'netif_txq_maybe_stop'
> 133 | int _res; \
> | ^
>
> Sparse:
>
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: warning: symbol '_res' shadows an earlier one
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: originally declared here
I don't see these building with LLVM=1 W=12 C=1
and I really don't like complicating the code because the compiler
is stupid. Can't you solve this with some renames? Add another
underscore or something?
X-sender: <netdev+bounces-83456-steffen.klassert=secunet.com@...r.kernel.org>
X-Receiver: <steffen.klassert@...unet.com> ORCPT=rfc822;steffen.klassert@...unet.com NOTIF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AAAATWVtYmVyc0dyb3VwRXhwYW5zaW9uBQAjAAIAAQ==
X-CreatedBy: MSExchange15
X-HeloDomain: b.mx.secunet.com
X-ExtendedProps: BQBjAAoAdEWmlidQ3AgFAGEACAABAAAABQA3AAIAAA8APAAAAE1pY3Jvc29mdC5FeGNoYW5nZS5UcmFuc3BvcnQuTWFpbFJlY2lwaWVudC5Pcmdhbml6YXRpb25TY29wZREAAAAAAAAAAAAAAAAAAAAAAAUASQACAAEFAAQAFCABAAAAHAAAAHN0ZWZmZW4ua2xhc3NlcnRAc2VjdW5ldC5jb20FAAYAAgABBQApAAIAAQ8ACQAAAENJQXVkaXRlZAIAAQUAAgAHAAEAAAAFAAMABwAAAAAABQAFAAIAAQUAYgAKAD8AAADLigAABQBkAA8AAwAAAEh1Yg==
X-Source: SMTP:Default MBX-ESSEN-02
X-SourceIPAddress: 62.96.220.37
X-EndOfInjectedXHeaders: 10852
Received: from cas-essen-01.secunet.de (10.53.40.201) by
mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.1.2507.37; Fri, 29 Mar 2024 21:19:11 +0100
Received: from b.mx.secunet.com (62.96.220.37) by cas-essen-01.secunet.de
(10.53.40.201) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend
Transport; Fri, 29 Mar 2024 21:19:11 +0100
Received: from localhost (localhost [127.0.0.1])
by b.mx.secunet.com (Postfix) with ESMTP id 231DC202E4
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 21:19:11 +0100 (CET)
X-Virus-Scanned: by secunet
X-Spam-Flag: NO
X-Spam-Score: -3.099
X-Spam-Level:
X-Spam-Status: No, score=-3.099 tagged_above=-999 required=2.1
tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.099, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
Authentication-Results: a.mx.secunet.com (amavisd-new);
dkim=pass (2048-bit key) header.d=kernel.org
Received: from b.mx.secunet.com ([127.0.0.1])
by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id aF1NBVBoN0ru for <steffen.klassert@...unet.com>;
Fri, 29 Mar 2024 21:19:10 +0100 (CET)
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=147.75.80.249; helo=am.mirrors.kernel.org; envelope-from=netdev+bounces-83456-steffen.klassert=secunet.com@...r.kernel.org; receiver=steffen.klassert@...unet.com
DKIM-Filter: OpenDKIM Filter v2.11.0 b.mx.secunet.com 82B0520270
Authentication-Results: b.mx.secunet.com;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b="mmn7bK5p"
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by b.mx.secunet.com (Postfix) with ESMTPS id 82B0520270
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 21:19:10 +0100 (CET)
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 37E431F22E43
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 20:19:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 62E3C13BC31;
Fri, 29 Mar 2024 20:19:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b="mmn7bK5p"
X-Original-To: netdev@...r.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850C532C89;
Fri, 29 Mar 2024 20:18:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1711743539; cv=none; b=qkg7bZWXnaWDqWm9OMTUKldCzr+aNi+EkgMvCd0cCOINFWNv90wOE+ERbfY0DBPTauBHBaZ9F5mNf6Oxz3hsUD/Wnqcq1irchTYluVZNbYEQfBfNjMl3RXI06FFyQURD+G7Ueun+7E3NgP0JwLeziiZASuexXNS0dP6vHnpObQI=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1711743539; c=relaxed/simple;
bh=XtVImmmSugd7Y+fhFyNSmTR6NDHudXo4Ksas1gA4z/s=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=Qqu4zCBTiJqgGnFdGLm/XtOGp4Us/lbdid0E7apFgBNq55apYx3ut6lCEtpoylX8bJ46arI5BqiniTPLcyz6+ZXWHLs3DnCqKNHsi8EkPv89ErnAleQGgT47rA5XApiBVz9a6chCtJtPcLnjFZbwyX4bGxsfvhhj1nWKqcr171M=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b=mmn7bK5p; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57D45C433C7;
Fri, 29 Mar 2024 20:18:58 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1711743538;
bh=XtVImmmSugd7Y+fhFyNSmTR6NDHudXo4Ksas1gA4z/s=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=mmn7bK5praEFKZSEsXD1U0+/BhIiMgbRjlqzURm8mJyxcKdG1u7nFhvjWn6vjh45L
4fMwTQz5BgPAhQhwxhdzDjswpLr9tfxyAozEWodJ9d27CxJ4UL4UFY8Hf3KdPpUow8
E8A+MEP24fcOZoxGi8rhDy8xtbiVoeUdXbHP4PlO33ntnqxcbRNqN9U47LzjpdNssC
YPsQGwM2m4yyhH+9eEUxcjM4Ffzgd6RloWxtSrDibmFc5c1SFjvFY0/UkKocjbZRfB
tH6Rp6GsCq/VsJXLXe3LZL+Iv2yl9gsZmI2qe8RWHTL8tXGuYUE5J+9mVzpCC1gcYY
0Sa+AbTpHn+oA==
Date: Fri, 29 Mar 2024 13:18:57 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Dmitry Safonov
<0x7f454c46@...il.com>, Heiner Kallweit <hkallweit1@...il.com>,
nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] netdev_queues: fix -Wshadow / Sparse
shadow warnings throughout the file
Message-ID: <20240329131857.730c6528@...nel.org>
In-Reply-To: <20240329170000.3241460-3-aleksander.lobakin@...el.com>
References: <20240329170000.3241460-1-aleksander.lobakin@...el.com>
<20240329170000.3241460-3-aleksander.lobakin@...el.com>
Precedence: bulk
X-Mailing-List: netdev@...r.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@...r.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@...r.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Return-Path: netdev+bounces-83456-steffen.klassert=secunet.com@...r.kernel.org
X-MS-Exchange-Organization-OriginalArrivalTime: 29 Mar 2024 20:19:11.1805
(UTC)
X-MS-Exchange-Organization-Network-Message-Id: ac983536-0487-46b2-3f43-08dc502d7edb
X-MS-Exchange-Organization-OriginalClientIPAddress: 62.96.220.37
X-MS-Exchange-Organization-OriginalServerIPAddress: 10.53.40.201
X-MS-Exchange-Organization-Cross-Premises-Headers-Processed: cas-essen-01.secunet.de
X-MS-Exchange-Organization-OrderedPrecisionLatencyInProgress: LSRV=mbx-essen-02.secunet.de:TOTAL-HUB=0.188|SMR=0.134(SMRDE=0.005|SMRC=0.129(SMRCL=0.102|X-SMRCR=0.128))|CAT=0.053(CATRESL=0.022
(CATRESLP2R=0.001)|CATORES=0.028(CATRS=0.027(CATRS-Index Routing
Agent=0.025)));2024-03-29T20:19:11.388Z
X-MS-Exchange-Forest-ArrivalHubServer: mbx-essen-02.secunet.de
X-MS-Exchange-Organization-AuthSource: cas-essen-01.secunet.de
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-FromEntityHeader: Internet
X-MS-Exchange-Organization-OriginalSize: 7867
X-MS-Exchange-Organization-HygienePolicy: Standard
X-MS-Exchange-Organization-MessageLatency: SRV=cas-essen-01.secunet.de:TOTAL-FE=0.020|SMR=0.008(SMRPI=0.006(SMRPI-FrontendProxyAgent=0.006))|SMS=0.012
X-MS-Exchange-Organization-Recipient-Limit-Verified: True
X-MS-Exchange-Organization-TotalRecipientCount: 1
X-MS-Exchange-Organization-Rules-Execution-History: 0b0cf904-14ac-4724-8bdf-482ee6223cf2%%%fd34672d-751c-45ae-a963-ed177fcabe23%%%d8080257-b0c3-47b4-b0db-23bc0c8ddb3c%%%95e591a2-5d7d-4afa-b1d0-7573d6c0a5d9%%%f7d0f6bc-4dcc-4876-8c5d-b3d6ddbb3d55%%%16355082-c50b-4214-9c7d-d39575f9f79b
X-MS-Exchange-Forest-RulesExecuted: mbx-essen-02
X-MS-Exchange-Organization-RulesExecu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pPLKY8NuKxanRuD6ufQ/+TeCN1NcEfl9Rf/Dhu1vZ64pxa3zo
cBT7u7ZTHNVaMTaAbpXMoq11JnV6S3XuonSswHFrCezG57bvFfga9O
pGLEkDdvbtdF2ORP20bJ42YeZln87fEYsguz0IAAABDs8BUmV0cmll
dmVyT3BlcmF0b3IsMTAsMDtSZXRyaWV2ZXJPcGVyYXRvciwxMSwxO1
Bvc3REb2NQYXJzZXJPcGVyYXRvciwxMCwwO1Bvc3REb2NQYXJzZXJP
cGVyYXRvciwxMSwwO1Bvc3RXb3JkQnJlYWtlckRpYWdub3N0aWNPcG
VyYXRvciwxMCwxO1Bvc3RXb3JkQnJlYWtlckRpYWdub3N0aWNPcGVy
YXRvciwxMSwwO1RyYW5zcG9ydFdyaXRlclByb2R1Y2VyLDIwLDE1
X-MS-Exchange-Forest-IndexAgent: 1 1092
X-MS-Exchange-Forest-EmailMessageHash: 7E5A4F6D
X-MS-Exchange-Forest-Language: en
X-MS-Exchange-Organization-Processed-By-Journaling: Journal Agent
On Fri, 29 Mar 2024 18:00:00 +0100 Alexander Lobakin wrote:
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: warning: declaration shadows a local variable [-Wshadow]
> 1992 | return netif_txq_maybe_stop(nq, IDPF_DESC_UNUSED(tx_q), size, size);
> | ^
> ./include/net/netdev_queues.h:137:11: note: expanded from macro 'netif_txq_maybe_stop'
> 137 | _res = netif_txq_try_stop(txq, get_desc, start_thrs); \
> | ^
> ./include/net/netdev_queues.h:92:7: note: expanded from macro 'netif_txq_try_stop'
> 92 | int _res; \
> | ^
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: note: previous declaration is here
> ./include/net/netdev_queues.h:133:7: note: expanded from macro 'netif_txq_maybe_stop'
> 133 | int _res; \
> | ^
>
> Sparse:
>
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: warning: symbol '_res' shadows an earlier one
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: originally declared here
I don't see these building with LLVM=1 W=12 C=1
and I really don't like complicating the code because the compiler
is stupid. Can't you solve this with some renames? Add another
underscore or something?
X-sender: <linux-kernel+bounces-125384-steffen.klassert=secunet.com@...r.kernel.org>
X-Receiver: <steffen.klassert@...unet.com> ORCPT=rfc822;steffen.klassert@...unet.com NOTIFY=NEVER; X-ExtendedProps=BQAVABYAAgAAAAUAFAARAPDFCS25BAlDktII2g02frgPADUAAABNaWNyb3NvZnQuRXhjaGFuZ2UuVHJhbnNwb3J0LkRpcmVjdG9yeURhdGEuSXNSZXNvdXJjZQIAAAUAagAJAAEAAAAAAAAABQAWAAIAAAUAQwACAAAFAEYABwADAAAABQBHAAIAAAUAEgAPAGIAAAAvbz1zZWN1bmV0L291PUV4Y2hhbmdlIEFkbWluaXN0cmF0aXZlIEdyb3VwIChGWURJQk9IRjIzU1BETFQpL2NuPVJlY2lwaWVudHMvY249U3RlZmZlbiBLbGFzc2VydDY4YwUACwAXAL4AAACheZxkHSGBRqAcAp3ukbifQ049REI2LENOPURhdGFiYXNlcyxDTj1FeGNoYW5nZSBBZG1pbmlzdHJhdGl2ZSBHcm91cCAoRllESUJPSEYyM1NQRExUKSxDTj1BZG1pbmlzdHJhdGl2ZSBHcm91cHMsQ049c2VjdW5ldCxDTj1NaWNyb3NvZnQgRXhjaGFuZ2UsQ049U2VydmljZXMsQ049Q29uZmlndXJhdGlvbixEQz1zZWN1bmV0LERDPWRlBQAOABEABiAS9uuMOkqzwmEZDvWNNQUAHQAPAAwAAABtYngtZXNzZW4tMDIFADwAAgAADwA2AAAATWljcm9zb2Z0LkV4Y2hhbmdlLlRyYW5zcG9ydC5NYWlsUmVjaXBpZW50LkRpc3BsYXlOYW1lDwARAAAAS2xhc3NlcnQsIFN0ZWZmZW4FAAwAAgAABQBsAAIAAAUAWAAXAEoAAADwxQktuQQJQ5LSCNoNNn64Q049S2xhc3NlcnQgU3RlZmZlbixPVT1Vc2VycyxPVT1NaWdyYXRpb24sREM9c2VjdW5ldCxEQz1kZQUAJgACAAEFACIADwAxAAAAQXV0b1Jlc3BvbnNlU3VwcHJlc3M6IDANClRyYW5zbWl0SGlzdG9yeTogRmFsc2UNCg8ALwAAAE1pY3Jvc29mdC5FeGNoYW5nZS5UcmFuc3BvcnQuRXhwYW5zaW9uR3JvdXBUeXBlDwAVAAAATWVtYmVyc0dyb3VwRXhwYW5zaW9uBQAjAAIAAQ==
X-CreatedBy: MSExchange15
X-HeloDomain: b.mx.secunet.com
X-ExtendedProps: BQBjAAoAdEWmlidQ3AgFAGEACAABAAAABQA3AAIAAA8APAAAAE1pY3Jvc29mdC5FeGNoYW5nZS5UcmFuc3BvcnQuTWFpbFJlY2lwaWVudC5Pcmdhbml6YXRpb25TY29wZREAAAAAAAAAAAAAAAAAAAAAAAUASQACAAEFAAQAFCABAAAAHAAAAHN0ZWZmZW4ua2xhc3NlcnRAc2VjdW5ldC5jb20FAAYAAgABBQApAAIAAQ8ACQAAAENJQXVkaXRlZAIAAQUAAgAHAAEAAAAFAAMABwAAAAAABQAFAAIAAQUAYgAKAEAAAADLigAABQBkAA8AAwAAAEh1Yg==
X-Source: SMTP:Default MBX-ESSEN-02
X-SourceIPAddress: 62.96.220.37
X-EndOfInjectedXHeaders: 10906
Received: from cas-essen-01.secunet.de (10.53.40.201) by
mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.1.2507.37; Fri, 29 Mar 2024 21:19:25 +0100
Received: from b.mx.secunet.com (62.96.220.37) by cas-essen-01.secunet.de
(10.53.40.201) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend
Transport; Fri, 29 Mar 2024 21:19:25 +0100
Received: from localhost (localhost [127.0.0.1])
by b.mx.secunet.com (Postfix) with ESMTP id D198D20315
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 21:19:25 +0100 (CET)
X-Virus-Scanned: by secunet
X-Spam-Flag: NO
X-Spam-Score: -5.399
X-Spam-Level:
X-Spam-Status: No, score=-5.399 tagged_above=-999 required=2.1
tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.099, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=unavailable autolearn_force=no
Authentication-Results: a.mx.secunet.com (amavisd-new);
dkim=pass (2048-bit key) header.d=kernel.org
Received: from b.mx.secunet.com ([127.0.0.1])
by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 04wgTj6sZHGR for <steffen.klassert@...unet.com>;
Fri, 29 Mar 2024 21:19:25 +0100 (CET)
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=139.178.88.99; helo=sv.mirrors.kernel.org; envelope-from=linux-kernel+bounces-125384-steffen.klassert=secunet.com@...r.kernel.org; receiver=steffen.klassert@...unet.com
DKIM-Filter: OpenDKIM Filter v2.11.0 b.mx.secunet.com 0140A202E4
Authentication-Results: b.mx.secunet.com;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b="mmn7bK5p"
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by b.mx.secunet.com (Postfix) with ESMTPS id 0140A202E4
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 21:19:24 +0100 (CET)
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 11885287903
for <steffen.klassert@...unet.com>; Fri, 29 Mar 2024 20:19:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A657D13BAFC;
Fri, 29 Mar 2024 20:19:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b="mmn7bK5p"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850C532C89;
Fri, 29 Mar 2024 20:18:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1711743539; cv=none; b=qkg7bZWXnaWDqWm9OMTUKldCzr+aNi+EkgMvCd0cCOINFWNv90wOE+ERbfY0DBPTauBHBaZ9F5mNf6Oxz3hsUD/Wnqcq1irchTYluVZNbYEQfBfNjMl3RXI06FFyQURD+G7Ueun+7E3NgP0JwLeziiZASuexXNS0dP6vHnpObQI=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1711743539; c=relaxed/simple;
bh=XtVImmmSugd7Y+fhFyNSmTR6NDHudXo4Ksas1gA4z/s=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=Qqu4zCBTiJqgGnFdGLm/XtOGp4Us/lbdid0E7apFgBNq55apYx3ut6lCEtpoylX8bJ46arI5BqiniTPLcyz6+ZXWHLs3DnCqKNHsi8EkPv89ErnAleQGgT47rA5XApiBVz9a6chCtJtPcLnjFZbwyX4bGxsfvhhj1nWKqcr171M=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@...nel.org header.b=mmn7bK5p; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57D45C433C7;
Fri, 29 Mar 2024 20:18:58 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1711743538;
bh=XtVImmmSugd7Y+fhFyNSmTR6NDHudXo4Ksas1gA4z/s=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=mmn7bK5praEFKZSEsXD1U0+/BhIiMgbRjlqzURm8mJyxcKdG1u7nFhvjWn6vjh45L
4fMwTQz5BgPAhQhwxhdzDjswpLr9tfxyAozEWodJ9d27CxJ4UL4UFY8Hf3KdPpUow8
E8A+MEP24fcOZoxGi8rhDy8xtbiVoeUdXbHP4PlO33ntnqxcbRNqN9U47LzjpdNssC
YPsQGwM2m4yyhH+9eEUxcjM4Ffzgd6RloWxtSrDibmFc5c1SFjvFY0/UkKocjbZRfB
tH6Rp6GsCq/VsJXLXe3LZL+Iv2yl9gsZmI2qe8RWHTL8tXGuYUE5J+9mVzpCC1gcYY
0Sa+AbTpHn+oA==
Date: Fri, 29 Mar 2024 13:18:57 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Dmitry Safonov
<0x7f454c46@...il.com>, Heiner Kallweit <hkallweit1@...il.com>,
nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] netdev_queues: fix -Wshadow / Sparse
shadow warnings throughout the file
Message-ID: <20240329131857.730c6528@...nel.org>
In-Reply-To: <20240329170000.3241460-3-aleksander.lobakin@...el.com>
References: <20240329170000.3241460-1-aleksander.lobakin@...el.com>
<20240329170000.3241460-3-aleksander.lobakin@...el.com>
Precedence: bulk
X-Mailing-List: linux-kernel@...r.kernel.org
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@...r.kernel.org>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@...r.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Return-Path: linux-kernel+bounces-125384-steffen.klassert=secunet.com@...r.kernel.org
X-MS-Exchange-Organization-OriginalArrivalTime: 29 Mar 2024 20:19:25.8902
(UTC)
X-MS-Exchange-Organization-Network-Message-Id: d20bea01-e9bc-4d2c-c411-08dc502d879f
X-MS-Exchange-Organization-OriginalClientIPAddress: 62.96.220.37
X-MS-Exchange-Organization-OriginalServerIPAddress: 10.53.40.201
X-MS-Exchange-Organization-Cross-Premises-Headers-Processed: cas-essen-01.secunet.de
X-MS-Exchange-Organization-OrderedPrecisionLatencyInProgress: LSRV=mbx-essen-02.secunet.de:TOTAL-HUB=0.393|SMR=0.326(SMRDE=0.004|SMRC=0.321(SMRCL=0.102|X-SMRCR=0.321))|CAT=0.065(CATOS=0.001
(CATSM=0.001)|CATRESL=0.026(CATRESLP2R=0.017)|CATORES=0.033(CATRS=0.033(CATRS-Index
Routing Agent=0.031 ))|CATORT=0.001(CATRT=0.001));2024-03-29T20:19:26.301Z
X-MS-Exchange-Forest-ArrivalHubServer: mbx-essen-02.secunet.de
X-MS-Exchange-Organization-AuthSource: cas-essen-01.secunet.de
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-FromEntityHeader: Internet
X-MS-Exchange-Organization-OriginalSize: 7871
X-MS-Exchange-Organization-HygienePolicy: Standard
X-MS-Exchange-Organization-MessageLatency: SRV=cas-essen-01.secunet.de:TOTAL-FE=0.017|SMR=0.008(SMRPI=0.006(SMRPI-FrontendProxyAgent=0.006))|SMS=0.010
X-MS-Exchange-Organization-Recipient-Limit-Verified: True
X-MS-Exchange-Organization-TotalRecipientCount: 1
X-MS-Exchange-Organization-Rules-Execution-History: 0b0cf904-14ac-4724-8bdf-482ee6223cf2%%%fd34672d-751c-45ae-a963-ed177fcabe23%%%d8080257-b0c3-47b4-b0db-23bc0c8ddb3c%%%95e591a2-5d7d-4afa-b1d0-7573d6c0a5d9%%%f7d0f6bc-4dcc-4876-8c5d-b3d6ddbb3d55%%%16355082-c50b-4214-9c7d-d39575f9f79b
X-MS-Exchange-Forest-RulesExecuted: mbx-essen-02
X-MS-Exchange-Organization-RulesExecuted: mbx-essen-02
X-MS-Exchange-Forest-IndexAgent-0: AQ0CZW4AAWYDAAAPAAADH4sIAAAAAAAEAL1UUW/bRgymZEu25Xgtin
av45sTLEsip2gbBVlRJC0QIG0HBF0xrK1wltj4UFnn3EmOPexX7BeP
J9lLm2SLkYcd5IN8JL+PH8nTX923Ob7SchMHe/haaBzsDB5j+Cza2e
EHf9wJeX+R0UzkKWk8UUPxReZ4oVVBUS/4GVMtp6TNdk7FNhUj0vZF
5gVl2zKdfK62uJjp2VYShXt7g2gvwguhc5mfRZhSkgktCqlyNCORqg
uDAjOViAynQksxzAh//+l9bfto+dCC4J+4XJqKUufIrNLynMdjMR9S
bAo1Wc/PN/H46JdX8dHL08P43Zt3py+P1otZfL6xiUb+QfW+sV/hVu
sSd7E+WdsWC0qyMqVKJf9SmsbnJZVktkZRuPs0CsMIc1sSpNnElirF
z1qNcSwSrbB/U3b9mpWjr7P+s2JNBg++Ulfoea2N/2ziGRVxSiZhIY
XQRVyMtNnYxw//IegOArlpT1eUt0xvIQ6/adVy8XRUwvZvy+3KulXW
p7sOZK1tomkqVWm+GUtpkDFolTHYXblMN0zB7v9dKOtzOhHaVPf4Tp
ULn3x1l818PFQZ9m3C/cvbnCMJnUn+dqic7syitDyTuciy+aI5XNq6
Lb3gGFOV9ws0RMh4hnBYyizlpPBCFiM8Ofn19UGI7w/CAR4ehL2AO4
PH/OGo4arYTH4hTNR4ksmE+86hjMQHKYNRIkpDi4PxRGakewGPhSnK
iUy38FBYhLkq0ahsah3ZWDEbNSbmycWYzHN8kaZcDmUl94LSfk5Noj
SxtsqRw/Kz51YQgAuNBniuA11+7Huz6XhtgLbT8QA88DsQtKDtVTtb
28DnfhO8pgMd3sFzHLcJwFEOgAONFnS6sMbODrjs2YZuy+lZB7jnQ4
udHoLPODWIa+ngfoXDVk6jCQ3emta6XjP6DvSgxVYmagCbm65N2/pw
MhzoXYF1utYNfmiAz+cPqnOrCzxWyujtKpZNgWWJrrNYfKdRy7nCco
nmrFVpPLKY8NuKxanRuD6ufQ/+TeCN1NcEfl9Rf/Dhu1vZ64pxa3zo
cBT7u7ZTHNVaMTaAbpXMoq11JnV6S3XuonSswHFrCezG57bvFfga9O
pGLEkDdvbtdF2ORP20bJ42YeZln87fEYsguz0IAAABDs8BUmV0cmll
dmVyT3BlcmF0b3IsMTAsMTtSZXRyaWV2ZXJPcGVyYXRvciwxMSwyO1
Bvc3REb2NQYXJzZXJPcGVyYXRvciwxMCwyO1Bvc3REb2NQYXJzZXJP
cGVyYXRvciwxMSwwO1Bvc3RXb3JkQnJlYWtlckRpYWdub3N0aWNPcG
VyYXRvciwxMCwyO1Bvc3RXb3JkQnJlYWtlckRpYWdub3N0aWNPcGVy
YXRvciwxMSwwO1RyYW5zcG9ydFdyaXRlclByb2R1Y2VyLDIwLDE3
X-MS-Exchange-Forest-IndexAgent: 1 1092
X-MS-Exchange-Forest-EmailMessageHash: 7E5A4F6D
X-MS-Exchange-Forest-Language: en
X-MS-Exchange-Organization-Processed-By-Journaling: Journal Agent
On Fri, 29 Mar 2024 18:00:00 +0100 Alexander Lobakin wrote:
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: warning: declaration shadows a local variable [-Wshadow]
> 1992 | return netif_txq_maybe_stop(nq, IDPF_DESC_UNUSED(tx_q), size, size);
> | ^
> ./include/net/netdev_queues.h:137:11: note: expanded from macro 'netif_txq_maybe_stop'
> 137 | _res = netif_txq_try_stop(txq, get_desc, start_thrs); \
> | ^
> ./include/net/netdev_queues.h:92:7: note: expanded from macro 'netif_txq_try_stop'
> 92 | int _res; \
> | ^
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:9: note: previous declaration is here
> ./include/net/netdev_queues.h:133:7: note: expanded from macro 'netif_txq_maybe_stop'
> 133 | int _res; \
> | ^
>
> Sparse:
>
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: warning: symbol '_res' shadows an earlier one
> drivers/net/ethernet/intel/idpf/idpf_txrx.c:1992:16: originally declared here
I don't see these building with LLVM=1 W=12 C=1
and I really don't like complicating the code because the compiler
is stupid. Can't you solve this with some renames? Add another
underscore or something?
Powered by blists - more mailing lists