[PATCH v2 03/23] examples/dma: resolve shadow variable warnings
fengchengwen
fengchengwen at huawei.com
Wed Apr 8 02:30:12 CEST 2026
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 4/7/2026 11:15 PM, Stephen Hemminger wrote:
> Fix shadow variable warnings by:
> - Renaming 'copy_mode' parameter to 'mode' in dma_parse_copy_mode()
> - Removing 'nb_queues' parameter from port_init() and using the
> global variable directly, since it's always called with the
> global nb_queues value
>
> ../examples/dma/dmafwd.c:593:33: warning: declaration of 'copy_mode'
> shadows a global declaration [-Wshadow]
> ../examples/dma/dmafwd.c:881:68: warning: declaration of 'nb_queues'
> shadows a global declaration [-Wshadow]
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list