From patchwork Mon Aug 12 21:56:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 143108 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8353457A5; Mon, 12 Aug 2024 23:56:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5E60402BB; Mon, 12 Aug 2024 23:56:25 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id A4BC2402AE for ; Mon, 12 Aug 2024 23:56:23 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1fc66fc35f2so40340355ad.0 for ; Mon, 12 Aug 2024 14:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723499783; x=1724104583; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=A/OfQUKZOJpS3t6sICyvaIUBBrQVcLjQYtCDUk6uEXQ=; b=jodCSc9is1TmJtH//L/4He3F7tdSSpC10sd3bR1byJ4PCR/GsQJKt0tfNizEws0UeP NbRgNCaB40EgJFhW5XFb5ZQan1WTzoaQ6nBCE0HX2z2gHgGwHL8sfikWsKoEKBy1z+0C 12Goi8doIcllhgR0IuiZEdXWTeSPvy+7vzJFuQliEwihj05wgCZYtwbwewgcG0/loVVn /GYn4c8MnL6md9qMlG9UOpMYpw61hNLmJBxrzwopwAgVW+zpt36t9u/WAc95UJunPkai 0kfcRuNokzK0cBOuJAY32rsykHPk4BOLzWH5GBcRbGZiNGEA69aTzuoKn+E6xk6HZPV1 5HtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723499783; x=1724104583; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A/OfQUKZOJpS3t6sICyvaIUBBrQVcLjQYtCDUk6uEXQ=; b=uY2YuJBjA5i9ffwyeUCtToC+U5pU5teP6twLkh0bSQVQUdUqKnOiH1asW7FVQuEn4R fkXBPcQvgb5gP8+YB2tBaoyjx6mLVUdkQSHdd6Bxa2e1M+1v/3qVAE8b0FmnTCWc/uJK rdkVf1koAqxODAhJ1osMejkxj5vwmEyokiBxc0SAfK5tOMcDYVLcBDb1bQBuoxatSqsh U3417ooE41loqF8xg5RtpONTlQIYZ9IvvXDzNZsYrIcyixoXsRMe2IaqBvaMCKEY22lS WVYBE0rNCYqs/Gk2z5d0eIiC9rvkClc6jMZBKH0NJQubwPjkn6z0uYs6Mm8Dp9ul1RzY FD4g== X-Gm-Message-State: AOJu0Yww6+/KMUOlbvq0opTD/NWYR4QcZitVNMBOYj8sNqRCEws2TtOb PjpWIb1shM9eLGCDpgynLYtziN7yii4eDZ6eBZIE2W7nJtvXbMsOXX30VpCWD2bFLxL5DInKLeW u X-Google-Smtp-Source: AGHT+IFOWvYS1jDysLVj+7Cur8neRp8VoBk04D2b/28WoDYATnyuF5xBg1wL4M6JnFtpoiw054dX9g== X-Received: by 2002:a17:902:e88f:b0:1fb:5d71:20dd with SMTP id d9443c01a7336-201cb9bc21emr17637585ad.0.1723499782584; Mon, 12 Aug 2024 14:56:22 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1abaaesm1453275ad.166.2024.08.12.14.56.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 14:56:21 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , David Hunt , Sivaprasad Tummala Subject: [PATCH] power: don't disable all cast qualifier warnings Date: Mon, 12 Aug 2024 14:56:09 -0700 Message-ID: <20240812215609.97353-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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 Only in one place does the power library need un-constify a pointer and this can be done by casting to uintptr_t first. Better, to have the warning enabled across the rest of the code. Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Bruce Richardson Acked-by: Huisong Li Acked-by: Tyler Retzlaff --- lib/power/meson.build | 4 +--- lib/power/rte_power_pmd_mgmt.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/power/meson.build b/lib/power/meson.build index b8426589b2..2f0f3d26e9 100644 --- a/lib/power/meson.build +++ b/lib/power/meson.build @@ -30,7 +30,5 @@ headers = files( 'rte_power_pmd_mgmt.h', 'rte_power_uncore.h', ) -if cc.has_argument('-Wno-cast-qual') - cflags += '-Wno-cast-qual' -endif + deps += ['timer', 'ethdev'] diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c index b1c18a5f56..6dec282054 100644 --- a/lib/power/rte_power_pmd_mgmt.c +++ b/lib/power/rte_power_pmd_mgmt.c @@ -664,7 +664,7 @@ rte_power_ethdev_pmgmt_queue_disable(unsigned int lcore_id, * ports before calling any of these API's, so we can assume that the * callbacks can be freed. we're intentionally casting away const-ness. */ - rte_free((void *)queue_cfg->cb); + rte_free((void *)(uintptr_t)queue_cfg->cb); free(queue_cfg); return 0;