From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id 905F64C57 for ; Thu, 6 Jul 2017 17:28:23 +0200 (CEST) Received: by mail-pf0-f173.google.com with SMTP id e7so2684713pfk.0 for ; Thu, 06 Jul 2017 08:28:23 -0700 (PDT) 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=uNI83nQo+a2VFq6YtpiSyDQ3YcENGbJds10vBS6ixso=; b=bN8zdgHt52i+Fu4hhEpIKVFOa8FB0Rh1hwR0lN5rhQUmTGgype6pvafcC1HdsBj7d0 qD5QIfLwMShxoEvmYgR3GLclmBOZCWLDKbKm2OLH6BVarggUeEWyEG8OLqC5bmC8dyUG 3/84CIeuh0E84fQ/o2UmIxxEL2pAC51a920P/bM10B5fzCBP/9IE6xuJNMaTiKKGJ+EN VgqdxlgPN0Xa/+pNJbY0H+Oubr2il2ijCmLZkVlj4yWJ3UfnR0bTYnIh0vRpl6IrBN/M y3vSaCJKAIx82IMeDBph8R8irwa168r+QzYOcNQslWbqqM0aL6XJNgec1nqRVpSqAyFt Me6Q== 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=uNI83nQo+a2VFq6YtpiSyDQ3YcENGbJds10vBS6ixso=; b=MiRaUq0x3kMxsp6FPo43lQJi94cuhxlCV42vFRg20z0GcznCvkwydw8rLPEVRCaoeW COWw7bbFrnTgaTbYZtNJt2L2RWOOTPUh8cntpcdUdLeEyuXf4gb1R3HFsC6gPbvll/8q UXOABpd8GaaFWj680IGtDcS7DAkcZgnaVwe4nKmenCUAZC9dbhNAazDV3OhTy1ANasNo lN8KNMgbB1agkxEFRgXoQxZm1oKgOJLcSRynZ7UTONCPIqpW5tD0HCe+09W3049kV36e BVojH+cCXqk59teNvYigh/QDjgPp7Eok7DijjZp1eERjhZWKWUurGYMcXfEsdgggyziO 9PHw== X-Gm-Message-State: AIVw1122O0XVu2ecBilTxJoQkH6t8Pr7vNalC9eEdDGhHe6E0eRvh774 mSfTBc9NvOAEUonJiCQskw== X-Received: by 10.99.9.69 with SMTP id 66mr16531394pgj.178.1499354902386; Thu, 06 Jul 2017 08:28:22 -0700 (PDT) Received: from xeon-e3.wavecable.com (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id v64sm1079224pfk.126.2017.07.06.08.28.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 08:28:21 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Thu, 6 Jul 2017 08:28:11 -0700 Message-Id: <20170706152812.16072-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170706152812.16072-1-stephen@networkplumber.org> References: <20170706152812.16072-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 2/3] fslmc: simplfy find_device 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, 06 Jul 2017 15:28:24 -0000 Don't need separate flag value. Signed-off-by: Stephen Hemminger --- drivers/bus/fslmc/fslmc_bus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 1e3bbeeb0a66..88b969c073a0 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -111,12 +111,10 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, const void *data) { struct rte_dpaa2_device *dev; - bool start_found = !start; TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) { - if (!start_found) { - if (&dev->device == start) - start_found = 1; + if (start && &dev->device == start) + start = NULL; /* starting point found */ continue; } -- 2.11.0