From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 63FA1292D for ; Sun, 22 Apr 2018 17:12:18 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8AD6020EDC; Sun, 22 Apr 2018 11:12:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Apr 2018 11:12:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pZjjxR8tGJp3lw4db mDc2FPCw496SwwzvnF/txNWDzE=; b=VDIw7iTQOyPNkl9NrERYM2lW+52tYmxFl nq3ZEweAtrbdlY5Nbkz7lejmpTVv/NSRckB3fY95LjnAmzHVOqcr6g7DBcLaxGVh vsGuoRUxDm+gLF8zFapU9eS/uTwQgN2Y+/9MLW9vDPW6UhFylflpZyw+pv+jpsjo oeLA1VbdKqS+WfIewgG+YKJx6elcMNiBgx6M6V6Wh08JeEl2ivw1Wk6LBt/Y+qN3 Y6azvHQYzSBl1WHTyhT8SM6bFfP2Ws8OVuWY7S5NZGt9iV/ILJd4I0gfpb6GFfw9 yF14+0a+ShQnrVAN1IPlDbh1Nmux18ybYNieJD2QX2ahIx2C405wA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=pZjjxR8tGJp3lw4dbmDc2FPCw496SwwzvnF/txNWDzE=; b=V2X1VI4X QWAdvtU3B/oGWbHqEuDTPyQPUN1OESELp8n4T31vjRa0kiEm83zN45LngROugWz+ R9Ep25kEGzMQDQ2Bwj9+I2ix4ydWNopWczm5XbWmA1TIo0TXMxvG16YMZ6ULvj5z CDu7juAJhdY9dOUd0ZKzoUEBQB3nN3ebBJ8xu8b0d/u09+GSsSJnfFkKd1dVZnH2 TbaD4nJQbPUufhG8nKHvGcUm9fr9Zd9TUVjHe9Q9rBmEduncQQxF+UyClnFgiZHL mIU2DLHpUsLu50CajdPc49Oq5XHGPQnBSsD093tKsapqbPdk9pmukMQnLaOJ2owZ E3X6KIPm24MY+Q== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.66]) by mail.messagingengine.com (Postfix) with ESMTPA id 1468310253; Sun, 22 Apr 2018 11:12:15 -0400 (EDT) From: Yuanhan Liu To: Matej Vido Cc: dpdk stable Date: Sun, 22 Apr 2018 23:09:41 +0800 Message-Id: <20180422150949.17523-51-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422150949.17523-1-yliu@fridaylinux.org> References: <20180422150949.17523-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' has been queued to LTS release 17.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2018 15:12:18 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/29/18. So please shout if anyone has objections. Thanks. --yliu --- >>From e0c8ca1c5a44fdec3ed075f3f826f3312dae71a1 Mon Sep 17 00:00:00 2001 From: Matej Vido Date: Wed, 4 Apr 2018 15:42:21 +0200 Subject: [PATCH] net/szedata2: fix format string for PCI address [ upstream commit ddbbe324db8fa340e01a389844dc703e8cb30072 ] For fscanf() function SCN macros should be used but PRI macros were wrongly used. Also use correct sizes of variables for read values. Fixes: 83556fd2c0fc ("szedata2: change to physical device type") Signed-off-by: Matej Vido --- drivers/net/szedata2/rte_eth_szedata2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 81ff73f52..88f5fb8a7 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1424,9 +1424,9 @@ get_szedata2_index(const struct rte_pci_addr *pcislot_addr, uint32_t *index) FILE *fd; char pcislot_path[PATH_MAX]; uint32_t domain; - uint32_t bus; - uint32_t devid; - uint32_t function; + uint8_t bus; + uint8_t devid; + uint8_t function; dir = opendir("/sys/class/combo"); if (dir == NULL) @@ -1451,7 +1451,7 @@ get_szedata2_index(const struct rte_pci_addr *pcislot_addr, uint32_t *index) if (fd == NULL) continue; - ret = fscanf(fd, "%4" PRIx16 ":%2" PRIx8 ":%2" PRIx8 ".%" PRIx8, + ret = fscanf(fd, "%8" SCNx32 ":%2" SCNx8 ":%2" SCNx8 ".%" SCNx8, &domain, &bus, &devid, &function); fclose(fd); if (ret != 4) -- 2.11.0