From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) by dpdk.org (Postfix) with ESMTP id 97A81CFA0 for ; Fri, 7 Apr 2017 19:45:11 +0200 (CEST) Received: by mail-it0-f44.google.com with SMTP id 70so1525912ita.0 for ; Fri, 07 Apr 2017 10:45:11 -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:in-reply-to:references; bh=90s1y3uDMUB6NCfDIKIR/0qH/alCnN34Jeg9BzoGD1o=; b=0MCE+q1rgaRPFJ9HTleqVJWkTqb3I/oAeKnwZatzW0JTog4oJpyYLgfCmMBS6DddMl u2xxm6z07fso5t4xcM80Y7tO0Nqb5xbWEvO54Wtv+o46ngLEu979HSY/J3mWHnjU4Ac8 26eqjcuf4WeGSzvDewav/5qIfkvfgGbxg71FxmRAQsP9g7mM7BONSyrUVASzZGOprtm6 +pxH2076z1WzaGmUQp8jzxVQVmZb6zNEWrVon/2FtrPVJWx/ao2V26zrbdjJ5yq0sF4S UB4YZponClQWuwx5LawAm36PhmarZb9SdAE5ojegUxe2/p0He23JZGx/sSFNDcCM1r8a 0IHA== 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:in-reply-to :references; bh=90s1y3uDMUB6NCfDIKIR/0qH/alCnN34Jeg9BzoGD1o=; b=hyWowjaGy04qnQZ8q/oRI9aoSsU0DoDqqDeUaoh4Bf7CdqXypE2PzDvkfm4iDYAsu8 UZdBHyW1GRGOEB/7wBwhxJ8nlJ7oryWlTyAVR8mfN6vpRno7WI+EbT9aZXP5GryTRQi5 iv5RTLh0FpPpaEYwG16Idbs9N4ImR/KiB4K2ecwCDIIOrx9Dh/UIQi6iRpZlBhNtwkKJ MHfBtzwQFnUXGbvpfm/tsLuON403O/kFvf7tp7a9pllK7Rq6Nw7XzZ/pTg0v0xjhdmAw B3GcfaS7G8NzM7Z1tVnHJ5218HwGzXHK+XziQ7UN/1wIgP2+h6O0CvrFI/CWIlnT5Eje 9r1Q== X-Gm-Message-State: AN3rC/4VlVhfEh6UGwYaTepz1y4OK8Tjf0YRRt+XBBRLMLwFIj2q5MRnsoMG1j735s1A7g== X-Received: by 10.36.139.199 with SMTP id g190mr604357ite.97.1491587110469; Fri, 07 Apr 2017 10:45:10 -0700 (PDT) Received: from plumbers-lap.home.lan ([66.171.166.114]) by smtp.gmail.com with ESMTPSA id s40sm4649675ite.18.2017.04.07.10.45.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Apr 2017 10:45:09 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 7 Apr 2017 13:44:53 -0400 Message-Id: <20170407174457.4180-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170407174457.4180-1-stephen@networkplumber.org> References: <20170407174457.4180-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 07/11] eal: remove unnecessary cast of void pointer 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: , X-List-Received-Date: Fri, 07 Apr 2017 17:45:12 -0000 Remove unnecessary casts of void * pointers to a specfic type. Signed-off-by: Stephen Hemminger --- lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- lib/librte_eal/linuxapp/eal/eal.c | 2 +- lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index fae6c7e0a..dbea0354c 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -195,7 +195,7 @@ rte_eal_config_create(void) rte_panic("Cannot mmap memory for rte_config\n"); } memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config)); - rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr; + rte_config.mem_config = rte_mem_cfg_addr; } /* attach to an existing shared memory config */ @@ -220,7 +220,7 @@ rte_eal_config_attach(void) if (rte_mem_cfg_addr == MAP_FAILED) rte_panic("Cannot mmap memory for rte_config\n"); - rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr; + rte_config.mem_config = rte_mem_cfg_addr; } /* Detect if we are a primary or a secondary process */ diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index d98d56d2f..266150c22 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -212,7 +212,7 @@ rte_eal_config_create(void) rte_panic("Cannot mmap memory for rte_config\n"); } memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config)); - rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr; + rte_config.mem_config = rte_mem_cfg_addr; /* store address of the config in the config itself so that secondary * processes could later map the config into this exact location */ diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 657c6f449..90cc3224b 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -610,12 +610,12 @@ static int cmp_physaddr(const void *a, const void *b) { #ifndef RTE_ARCH_PPC_64 - const struct hugepage_file *p1 = (const struct hugepage_file *)a; - const struct hugepage_file *p2 = (const struct hugepage_file *)b; + const struct hugepage_file *p1 = a; + const struct hugepage_file *p2 = b; #else /* PowerPC needs memory sorted in reverse order from x86 */ - const struct hugepage_file *p1 = (const struct hugepage_file *)b; - const struct hugepage_file *p2 = (const struct hugepage_file *)a; + const struct hugepage_file *p1 = b; + const struct hugepage_file *p2 = a; #endif if (p1->physaddr < p2->physaddr) return -1; -- 2.11.0