From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH] eal: eliminate cast of hpet_msb_inc Date: Wed, 10 Oct 2018 16:22:19 -0700 Message-ID: <20181010232219.28410-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Stephen Hemminger To: dev@dpdk.org Return-path: 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) 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; -- 2.19.1