From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 2/6] eal/linux: remove useless casts Date: Thu, 09 Jul 2015 04:04:18 +0200 Message-ID: <46336707.Mc8mLjdgqb@xps13> References: <1436259634-7077-1-git-send-email-david.marchand@6wind.com> <1436259634-7077-3-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: David Marchand Return-path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id A9A0F569A for ; Thu, 9 Jul 2015 04:05:25 +0200 (CEST) Received: by widjy10 with SMTP id jy10so232033700wid.1 for ; Wed, 08 Jul 2015 19:05:24 -0700 (PDT) In-Reply-To: <1436259634-7077-3-git-send-email-david.marchand@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" David, there is a 32-bit failure. See below 2015-07-07 11:00, David Marchand: > Rather than cast the huge pages number returned by get_num_hugepages,= rework > this function so that it returns 0 when something goes wrong. > And no need for casts in log. > --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c > +=09=09=09=09=09RTE_LOG(INFO, EAL, "%lu hugepages of size %lu reserve= d, " > +=09=09=09=09=09=09"but no mounted hugetlbfs found for that size\n", > +=09=09=09=09=09=09num_pages, hpi->hugepage_sz); error: format =E2=80=98%lu=E2=80=99 expects argument of type =E2=80=98l= ong unsigned int=E2=80=99, but argument 5 has type =E2=80=98uint64_t {a= ka long long unsigned int}=E2=80=99