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 4D0DBA04FF; Mon, 21 Mar 2022 17:17:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B5C6427E9; Mon, 21 Mar 2022 17:17:05 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 49DAD427EB for ; Mon, 21 Mar 2022 17:17:03 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id p8so15846794pfh.8 for ; Mon, 21 Mar 2022 09:17:03 -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=gYbW3JQ0pl6ANAO8kcUFkX8jSTUIzNFJzYhjToZfA0o=; b=UiUN8BQC+e+gkghyAwpzHZ7NoSsd53kY3keHNGCpFBS2ZRm+u5lU2hwNApNjXTlRfH kam+jGg0S/2xMlTzPnGwI4SZkmQU0RYoqTJXgt3AgYZrumnTfeo5J2DhJOktoDHByyWX TZcOCWuCvYpgfMt4e5dSd47et+mnhCVJgdSGjryfwTvkzu/cFm3CtdDo6On9gGf1Mkrb 65ufSaJtMbBaFANgVWpYrYfFZYEo5sNUrmsGiWwc3X6gr0LZ6qmPSClUlvNA3I4qlscI 67oC3PtCS/vx3Bwvd9B89p03/QX/Jp83t2Sbo0ldkylsJH9CTnt15bzOoQjErMTJRCKP Wx7g== 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=gYbW3JQ0pl6ANAO8kcUFkX8jSTUIzNFJzYhjToZfA0o=; b=jY6aJJrhEODPSMK0swiFhYKRNafhfqiNlNASDFZoe97lVfcC18gphyyxwyB39CE8sA Kf5YFF1uosOueumefHD/pQW9qIRyg30K5ltF//29RxoBUK1vnzP80Z2sRmxyK4+Pf/Zh q/G272V50nG6NvqXsSb6yuI5S1Yk7nrrLkgPM+/eVhxixPYTSJy2k6EhQV9EdEv8Iwfv R86S3f5Z8HTPEjWuxGnu3tfU6aG7Ft+a2AQJFlN9vqlXx03TXDSxL23nr73UscHOpCQO yJ+1eW6RL0Hf5MjPlysmHizeHK7yJvLQPKAODRl957IJmKVkv3xxJGgZnfIaCnB9Vj9W Vd0A== X-Gm-Message-State: AOAM530SO2TmIQHVjSmsY247Kcq7w+e/DFPBk2yNT7doDnsGU6lH5d8L 2gLB0AujeyPGx0/NWTYtTEZiUQ== X-Google-Smtp-Source: ABdhPJxJ0+jGLzRCdUNjx9C94MkaeaNuf9wBzx53RmLk4DGQ3c8py2qY+axWePKfPIid/Foxa91Dmw== X-Received: by 2002:a05:6a00:8cc:b0:4bc:3def:b616 with SMTP id s12-20020a056a0008cc00b004bc3defb616mr24751971pfu.18.1647879422297; Mon, 21 Mar 2022 09:17:02 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id k3-20020a17090ad08300b001c6d797ee13sm7843315pju.56.2022.03.21.09.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 09:17:01 -0700 (PDT) Date: Mon, 21 Mar 2022 09:16:59 -0700 From: Stephen Hemminger To: Shibin Koikkara Reeny Cc: david.hunt@intel.com, dev@dpdk.org, alan.carew@intel.com, stable@dpdk.org Subject: Re: [PATCH v2] examples/vm_power: add support for list_foreach_safe Message-ID: <20220321091659.43e6eb99@hermes.local> In-Reply-To: <20220321093342.1223208-1-shibin.koikkara.reeny@intel.com> References: <20220301145313.560577-1-shibin.koikkara.reeny@intel.com> <20220321093342.1223208-1-shibin.koikkara.reeny@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 Mon, 21 Mar 2022 09:33:42 +0000 Shibin Koikkara Reeny wrote: > diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c > index 838465ab4b..d297b28114 100644 > --- a/examples/vm_power_manager/channel_manager.c > +++ b/examples/vm_power_manager/channel_manager.c > @@ -66,8 +66,8 @@ LIST_HEAD(, virtual_machine_info) vm_list_head; > static struct virtual_machine_info * > find_domain_by_name(const char *name) > { > - struct virtual_machine_info *info; > - LIST_FOREACH(info, &vm_list_head, vms_info) { > + struct virtual_machine_info *info, *t_info; > + RTE_LIST_FOREACH_SAFE(info, &vm_list_head, vms_info, t_info) { > if (!strncmp(info->name, name, CHANNEL_MGR_MAX_NAME_LEN-1)) Please add blank line after declarations. It didn't have it before but is better style.