From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39AAFA0555; Fri, 3 Jun 2022 17:12:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D53C040694; Fri, 3 Jun 2022 17:11:59 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 2552A4021E for ; Fri, 3 Jun 2022 17:11:58 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id w3so7003523plp.13 for ; Fri, 03 Jun 2022 08:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l4/DMIyijv+ZGmBvrYHbfCnxdkyYH5o08vgkIZhYN44=; b=CLk63pvA7Wc5pXhHpJcLSHzeOIg1MdgS650hVcX3byUBgHOQtjZOP4DSZ9P4frJ1HP TbNmitTElSVR4slYlFXMzYrXkUS9RxvMO/dc6MG8UoxX2dbwZ637Y0pZYwtrJgmtWQF+ Tam/xitshIpp/zBb09mpUBRyOU8KhKXw030iFHEjjDYVGbkUwFRrMbkVcs0DJYdsS6hR 7FBhfFy4AElOda29t1bjjPlpecuSDUK5FV1wmwzCfPtGahWbQgbl2J70XU5RWCROl3c6 Bmu+AWbLbUyFLMWjGPPhnZXEB8Aj+H2BnLxpXdqZiTUgrufajmAE44RaSi4IKCLq+rBC 4pLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l4/DMIyijv+ZGmBvrYHbfCnxdkyYH5o08vgkIZhYN44=; b=YgO5vaix1a6fdYjx8PKNOxMAQl7vGRxkgPPaIrWMI21b2lhRIv5iP0fhWdUjjvtxrl BfFKi+YqTb1FUKm/wDi9U7oEp8LbYK3U4gKxCNhC/8K9vynvuxWugKjIdfOo+bTgQuC1 5dr8ugtJHxu45rVhMkA0dnd+TVxUfKbImaG/2iDyFWeTXME75hvQn1dvSIk8bSY7u/3y /QVGSzhe7vVu495hFE3J1VWcVHNsQrB/kQDQB2p+doRsUQkScPEr9inIiQPB8SnMW8K+ uy24lL18SR7ue/b1WR7sK2S4kY5icwXmmeVh9P6vn5Qc8BFrbs0WUQmrTVJHYT/UywHt 1ZEQ== X-Gm-Message-State: AOAM530W91mWPDvRKw0Uopygx+maSK1nPCzQA23IMvRJq5HuiPNl8pt+ sH/4rMd8prV5VWcNeGQh8pn2uQ== X-Google-Smtp-Source: ABdhPJwDrrQwpS/qmcIek+mMq2XqMiw62HGVXw2ckkaWT9OncXW4acr1hMwjBTUhgk+a720BsUzpkg== X-Received: by 2002:a17:902:bf0a:b0:162:201e:1f49 with SMTP id bi10-20020a170902bf0a00b00162201e1f49mr10498178plb.39.1654269117218; Fri, 03 Jun 2022 08:11:57 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id h7-20020a170902680700b001651562eb16sm5510598plk.124.2022.06.03.08.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jun 2022 08:11:56 -0700 (PDT) Date: Fri, 3 Jun 2022 08:11:54 -0700 From: Stephen Hemminger To: Kevin Laatz Cc: dev@dpdk.org, Morten =?UTF-8?B?QnLDuHJ1cA==?= , Bruce Richardson Subject: Re: [PATCH v7] eal: add bus cleanup to eal cleanup Message-ID: <20220603081154.12568fa1@hermes.local> In-Reply-To: <20220603143601.230519-1-kevin.laatz@intel.com> References: <20220419161438.1837860-1-kevin.laatz@intel.com> <20220603143601.230519-1-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 3 Jun 2022 15:36:01 +0100 Kevin Laatz wrote: > +/* Clean up all devices of all buses */ > +int > +eal_bus_cleanup(void) > +{ > + int ret = 0; > + struct rte_bus *bus; > + > + TAILQ_FOREACH(bus, &rte_bus_list, next) { > + if (bus->cleanup == NULL) > + continue; > + if (bus->cleanup() != 0) > + ret = -1; > + } > + > + return ret; > +} > + This is an internal function, and all users of it look like they don't use the return value. Why not make the function void eal_bus_cleanup() and simplify back up the call chain?