From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by dpdk.org (Postfix) with ESMTP id 1C1593572 for ; Tue, 12 Mar 2019 11:22:54 +0100 (CET) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 73DCD9E0456; Tue, 12 Mar 2019 10:22:53 +0000 (UTC) Received: from ncopa-desktop.lan (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: n@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 92B9A9E0026; Tue, 12 Mar 2019 10:22:51 +0000 (UTC) From: Natanael Copa To: dev@dpdk.org Cc: Natanael Copa Date: Tue, 12 Mar 2019 11:22:36 +0100 Message-Id: <20190312102236.18812-1-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190311112129.068377a0@shemminger-XPS-13-9360> References: <20190311112129.068377a0@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH v2 15/15] eal/linux: simplify debug message in sigbus_handler 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: Tue, 12 Mar 2019 10:22:54 -0000 There is no guarantee that pthread_self() returns the thread ID or that pthread_t is an integer. The thread ID is not that useful so simply remove it. This fixes the following warning when building with musl libc: ../lib/librte_eal/linuxapp/eal/eal_dev.c: In function 'sigbus_handler': ../lib/librte_eal/linuxapp/eal/eal_dev.c:70:3: warning: cast from pointer= to integer of different size [-Wpointer-to-int-cast] (int)pthread_self(), info->si_addr); ^ Signed-off-by: Natanael Copa --- v1 -> v2: remove gettid() and remove thread id from debug message. lib/librte_eal/linuxapp/eal/eal_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linux= app/eal/eal_dev.c index 2830c8687..c41809380 100644 --- a/lib/librte_eal/linuxapp/eal/eal_dev.c +++ b/lib/librte_eal/linuxapp/eal/eal_dev.c @@ -66,8 +66,8 @@ static void sigbus_handler(int signum, siginfo_t *info, { int ret; =20 - RTE_LOG(DEBUG, EAL, "Thread[%d] catch SIGBUS, fault address:%p\n", - (int)pthread_self(), info->si_addr); + RTE_LOG(DEBUG, EAL, "Thread catch SIGBUS, fault address:%p\n", + info->si_addr); =20 rte_spinlock_lock(&failure_handle_lock); ret =3D rte_bus_sigbus_handler(info->si_addr); --=20 2.21.0