From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 48EE2F64 for ; Mon, 30 Apr 2018 16:43:20 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id m70so13229664wma.2 for ; Mon, 30 Apr 2018 07:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q6bEgSXphBg0IvB8h1Ac5lTSv2kSsOvk398J95lRMbY=; b=Dg2gnqaygOODbMPywyUchizve/UfnZWRbYlTeaOPeQxXBc+tQjYKqgTP+jVLu3jaRf wLwCwqP993VXrb9IVk0Ro3s/pcXAohlJuO0cl0o9xOlxsK4wcSZUOUduyc3NgyZMX93H RXAbya92NTS7P/xDklpQF5+whcGuWx5l5Yjfft48s/JrM/+rj4OwfO2A9DzRVMmYDdHh 2eJtY9Nn0VipMGxxIxOAzY170weVdPCwdhXPqs/rXJkce/NYgahNg6zM7egygmaV2IVH ktLMgUMx2DNk+2h+DnQxlIoTtdQacrUkDbOXFxaZHTEOQfl63R/vD2eUEy/SdByI8CIF zsEg== 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=Q6bEgSXphBg0IvB8h1Ac5lTSv2kSsOvk398J95lRMbY=; b=CqXESOXJhCgMv3e7+NvFfgrjN79hTtzeKHj+u10o6zIX3hUXS/nJYmKjEKLqgDZR9o vJhFvAuMn5KybNuweY9gNSMEwCxqikhdP8dzhRnD+1Bmt3BhMXkTRtimRdOIax0ZDxXY eH3feyqEGDoAOQ6BWg9IoScifkKOkS6lYit9D4FtmgZjUgVuzihnrGAl38NoXlZaj/Sq mBSxSEbZy/gOVUFeusw0k/hoKYlzDEzzYxt3JmBnBN5l+8h187LeW3Z/xQt2p8IJQVTn 7qspxW36HIRbB+g4d/uElS++X8f0D+PRUcfT3XlewaJtdRSFowZGXSdVLysU7KkvViIx 68mw== X-Gm-Message-State: ALQs6tAg+hvsdMNGtuXjsF0ImOOvwYdws7wFv/VGf6gcFk43t10tE3SC CHKhUCrDwF9IKYpj97W2SGE= X-Google-Smtp-Source: AB8JxZoQR1GYOBvXHK05/rLCd1V+pgCxKNPsHv4gDlXKP34bHBbHbL0K0nDo9X2DiDf6Rnp59ouBdw== X-Received: by 10.28.17.71 with SMTP id 68mr7166215wmr.93.1525099399901; Mon, 30 Apr 2018 07:43:19 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id d12-v6sm8118705wrg.2.2018.04.30.07.43.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:43:19 -0700 (PDT) From: luca.boccassi@gmail.com To: Matej Vido Cc: dpdk stable Date: Mon, 30 Apr 2018 15:40:49 +0100 Message-Id: <20180430144223.18657-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' has been queued to stable release 18.02.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: Mon, 30 Apr 2018 14:43:21 -0000 Hi, FYI, your patch has been queued to stable release 18.02.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 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 98d5e864b122fad4523d8e8eeb71641177bc68d8 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 dc2079e0d..31b11e5cd 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.14.2