From patchwork Wed Oct 10 23:22:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 46525 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC3361B4B1; Thu, 11 Oct 2018 01:22:28 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 952421B499 for ; Thu, 11 Oct 2018 01:22:27 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id y15-v6so3227828plr.12 for ; Wed, 10 Oct 2018 16:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=izCFPh7wFmjskVh5yn5kUyuJ7bvI/lqYNMZO4rI4DQE=; b=IdKefVeC/G12BanEivJ1x+HI4NRsA/cMwT3UrqjbMLSWCNcc65j+reEAxpvvf5Q2kk L2KDV0kv2JiYgcJx3Cwb+UHQuZ9GiBGji5r8ILMV+0tLoCz8sgIka8XYbmSgKBXbd6pU NeaEm8gMNQfemYEK9qusjlUUL6MFkCvYvXu95DPyh/lNeMQA55DUbzqQTSkHffF7iOoR jjcdvESaqI7EYoxBRfymQGcfvAnTtUxj+hsoEzpxQQUOTbFlgxhwxHWejq7eSmszjLFI uxkYgAkmQCkPUamODPM3Y1GQFkPf4Ba4Jd3CpUb9rkhabw4ynsoPaJDuxfpQUM9BQP7b tdMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=izCFPh7wFmjskVh5yn5kUyuJ7bvI/lqYNMZO4rI4DQE=; b=tXawQSBmiKFTyXkzkd5074xmlXxvs7Y8WISPdLpwJ490T7MDS9+eQ9gzA3vvhKrnl9 zXnH10vtVrU2MqLJrPNWc6kI1znevC/038njRxIGsRGJCD98Q54COphfPAtCqToSYwhq Q8+bkzS/8v8h7lAl/rfpfl7NxGnLDEJEdKCQo45Tn0u1Mo/R+uDNmnTvUnA+w2uiHUjd mZsutr0/FHxrNVWl5JmfL2s+RJwke527BZxH/VAJYauWBYSt7jewV5bvLjsKEQo3hoNr 5uh+sf6T0TIzt5O0jxycN4xKB+s/GN9jSa0YuUC100y2yLiFkTjFFpgCO/pb3W73yVES IgyA== X-Gm-Message-State: ABuFfoisIXSDjpR9TPMgYucLQe3nyuGPNaK1mEEvoUxOQ8bszM4oDdhB aHXgvHSCTuX40Zngaik6crJXeNHXlZ0= X-Google-Smtp-Source: ACcGV62fB3kcD8asTJwy1Ip6YuPdpNSbY/R6s7LSHXv4/sy61V1p29t4dGTPG14H2y77vXI0PGXmYg== X-Received: by 2002:a17:902:7582:: with SMTP id j2-v6mr35200196pll.76.1539213746348; Wed, 10 Oct 2018 16:22:26 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u21-v6sm40102218pfa.176.2018.10.10.16.22.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 16:22:25 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 10 Oct 2018 16:22:19 -0700 Message-Id: <20181010232219.28410-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] eal: eliminate cast of hpet_msb_inc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The cast of hpet_msb_inc is causing a warning in some compilations. Yet the cast is unnecessary, the function is used only one place just use the correct signature. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal_timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib/librte_eal/linuxapp/eal/eal_timer.c index 2766bd7895b3..bc8f051990ba 100644 --- a/lib/librte_eal/linuxapp/eal/eal_timer.c +++ b/lib/librte_eal/linuxapp/eal/eal_timer.c @@ -87,7 +87,7 @@ static pthread_t msb_inc_thread_id; * containing used to process MSB of the HPET (unfortunately, we need * this because hpet is 32 bits by default under linux). */ -static void +static void * hpet_msb_inc(__attribute__((unused)) void *arg) { uint32_t t; @@ -98,6 +98,7 @@ hpet_msb_inc(__attribute__((unused)) void *arg) eal_hpet_msb ++; sleep(10); } + return NULL; } uint64_t @@ -178,7 +179,7 @@ rte_eal_hpet_init(int make_default) /* create a thread that will increment a global variable for * msb (hpet is 32 bits by default under linux) */ ret = rte_ctrl_thread_create(&msb_inc_thread_id, "hpet-msb-inc", NULL, - (void *(*)(void *))hpet_msb_inc, NULL); + hpet_msb_inc, NULL); if (ret != 0) { RTE_LOG(ERR, EAL, "ERROR: Cannot create HPET timer thread!\n"); internal_config.no_hpet = 1;