From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id F2E04A045E for ; Fri, 31 May 2019 13:11:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BF90375B; Fri, 31 May 2019 13:11:43 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 78E93375B; Fri, 31 May 2019 13:11:42 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2556A3B70; Fri, 31 May 2019 11:11:36 +0000 (UTC) Received: from aldebaran.drizzt.lan (dhcp19-189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2A147838D; Fri, 31 May 2019 11:11:34 +0000 (UTC) From: Timothy Redaelli To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 31 May 2019 13:11:26 +0200 Message-Id: <0c31ecf46994f3c582f14842446c538ebe0622d9.1559301086.git.tredaelli@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 31 May 2019 11:11:41 +0000 (UTC) Subject: [dpdk-stable] [PATCH] usertools: Fix clearing any old data 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Currently clear_data (dpdk-devbind.py) doesn't work as expected since "global devices" is missing and so "devices" is considered a local variable. This commit changes "clear_data" function in order to really clear devices by adding "global devices". CC: stable@dpdk.org Signed-off-by: Timothy Redaelli --- usertools/dpdk-devbind.py | 1 + 1 file changed, 1 insertion(+) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 9e79f0d28..e6b551d33 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -210,6 +210,7 @@ def get_pci_device_details(dev_id, probe_lspci): def clear_data(): '''This function clears any old data''' + global devices devices = {} def get_device_details(devices_type): -- 2.21.0