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 4B3FDA0555; Fri, 3 Jun 2022 17:39:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCA7240694; Fri, 3 Jun 2022 17:39:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id DDEE54021E for ; Fri, 3 Jun 2022 17:39:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654270766; x=1685806766; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oTVMxXIJaTYJckIXitDGOl7lsNgGnvivou0lkzOnDjU=; b=UxkgqV8p2nCi8U6hGy3InrY0CyplHUheNi/sJkS4bG+nWbE9oU3geZTv 50pZdK7Q+7fraQKKqjBhogRXQmpbCZX4JW05Cp8kCEmAdLHkWU1lhQ0v7 rh2biDd5d2X64zdu58k1Y2mK7Hz0LVNwcEGQX4GQ15YfAoXiBmpEZ/ZGS QCMIMp1VUf1IR9YTnRPll1ZRmh6LxwHWmuj0GyOergv24uXRutrgSGj+p LcF6fJ3v3f++zugq8vktjN3ss6faaZB4AnazmjOl1rbBDvs4Ymk0n0V96 u51Q+mZo71/UG3lqHMHXFdBfE5iMhHjoda4ZApEQxPk1rAMjkcCcfi/Wi A==; X-IronPort-AV: E=McAfee;i="6400,9594,10367"; a="273841368" X-IronPort-AV: E=Sophos;i="5.91,274,1647327600"; d="scan'208";a="273841368" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2022 08:39:23 -0700 X-IronPort-AV: E=Sophos;i="5.91,274,1647327600"; d="scan'208";a="708071982" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.25]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 03 Jun 2022 08:39:21 -0700 Date: Fri, 3 Jun 2022 16:39:16 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: Kevin Laatz , dev@dpdk.org, Morten =?iso-8859-1?Q?Br=F8rup?= Subject: Re: [PATCH v7] eal: add bus cleanup to eal cleanup Message-ID: References: <20220419161438.1837860-1-kevin.laatz@intel.com> <20220603143601.230519-1-kevin.laatz@intel.com> <20220603081154.12568fa1@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220603081154.12568fa1@hermes.local> 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, Jun 03, 2022 at 08:11:54AM -0700, Stephen Hemminger wrote: > 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? Is there really that much difference in doing so? My own slight preference would be to have the error codes available for future use in case we want them, so long as the overhead of them is not great (which it should not be). However, if others all feel that having these functions return void is best, I'm happy enough with that too.