From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 05A041B2CD for ; Thu, 15 Feb 2018 23:25:56 +0100 (CET) Received: by mail-pg0-f68.google.com with SMTP id j9so918901pgv.3 for ; Thu, 15 Feb 2018 14:25:56 -0800 (PST) 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=jKpS48CmP+2V1Qa3H3qVACf646Kii4afhIszDAwXxho=; b=itU4cYd8WvRhTQ0ceHS+eSW/AOY779xiJumv5hOJtXgLzLVO2riZMFfPCk1cVn9PqJ sFh3L7EuKm0YPonKlYm6UzueqZo3m8y0iFEUEhKIGcJegOn+PJNafstODu1guxlIppXB JDV/ANrBAReUhLeobIovup55AuSFoZugwhrPTSSUV9cAHR67Xlzj1B5iNLSXRK65Yern RpKSULvGFEVNJ/hFtH535ee1zg90fKQDNkzNE+6rXZ6qghtxeSnrjR6De4FMs54rWerX yf7QLc3EMldv1x0WO0yy1iPDKBxHuJishspyNFIvMzNe1soUrbA7gR9MMOpn0h/HS4/7 eWpg== 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=jKpS48CmP+2V1Qa3H3qVACf646Kii4afhIszDAwXxho=; b=AavBcI553Y8ZPi0o3IpEUHLqShk3ZgifMoVX4AZL7C7XacZSyEnz4UYOaEmWgPkth9 ba5p9q9MNCemUeMmAT4z2+76AMAYCHi9Y2wYrifKKLUQTodRdY5Jp2oM3ykv5M6KPlls MAsZ89oRRrorQb5a+D69ouQTx7VhnqB8hOY2j1T97ROZOFvJs+RxkK8Smry/WEOKTbZH I2iXC017fxNF7SXwVTKZ5mxFG3X9s0CX7aZwkwkM+a/rxCd5GxX1RNFrSMK2gK7rrlP3 BDw1ZLZCt9T8de8XHtbl0kUQWaHhPAMtsL9CswjF2+4MmPrMLG++lt16qAzcC8d9IJEw Fw4Q== X-Gm-Message-State: APf1xPCF9/Ut0W6MCx/1K1z9OeFQdfwy5Ul7cDcJhuaOwTl6Pka6KhRT uQR7d1ssJkqar0ayXef6XsAtD0aLEp0= X-Google-Smtp-Source: AH8x227KgPsmTzgsvgQO22srQq+mAzqKvkQc8EXpwliqH+Zaixt9h1NrCD2dAwnKy38fZUnPwcH1SA== X-Received: by 10.98.26.143 with SMTP id a137mr4095255pfa.100.1518733555814; Thu, 15 Feb 2018 14:25:55 -0800 (PST) Received: from xeon-e3.lan (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id y22sm45630426pfd.9.2018.02.15.14.25.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 14:25:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Thu, 15 Feb 2018 14:25:50 -0800 Message-Id: <20180215222550.31128-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180215222550.31128-1-stephen@networkplumber.org> References: <20180215222550.31128-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 2/2] eal: use %zu to format size_t 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: Thu, 15 Feb 2018 22:25:57 -0000 The recommended way to format size_t in printf is to use the z modifier which handles the case where size_t maybe 32 or 64 bits. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 38853b753aab..86df67480201 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -1390,16 +1390,16 @@ rte_eal_hugepage_attach(void) max_seg = s; if (base_addr != MAP_FAILED) { /* errno is stale, don't use */ - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes " + RTE_LOG(ERR, EAL, "Could not mmap %zu bytes " "in /dev/zero at [%p], got [%p] - " "please use '--base-virtaddr' option\n", - (unsigned long long)mcfg->memseg[s].len, + mcfg->memseg[s].len, mcfg->memseg[s].addr, base_addr); munmap(base_addr, mcfg->memseg[s].len); } else { - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes " + RTE_LOG(ERR, EAL, "Could not mmap %zu bytes " "in /dev/zero at [%p]: '%s'\n", - (unsigned long long)mcfg->memseg[s].len, + mcfg->memseg[s].len, mcfg->memseg[s].addr, strerror(errno)); } if (aslr_enabled() > 0) { -- 2.15.1