DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, ci@dpdk.org
Subject: Re: [PATCH v4 4/4] eal: remove unneeded includes from a public header
Date: Wed, 21 Sep 2022 13:37:05 +0200	[thread overview]
Message-ID: <CAJFAV8zYGoUJhD6eRKGKks=hkHPN4DkDLSwpqCEQ8DBSxZqWhw@mail.gmail.com> (raw)
In-Reply-To: <20220827113222.3951505-5-dmitry.kozliuk@gmail.com>

On Sat, Aug 27, 2022 at 1:33 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
> because they are not used by this file.
> Include the needed headers directly from the files that need them.
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---

[snip]

>  examples/vdpa/main.c                                     | 1 +
>  examples/vhost/main.c                                    | 2 ++
>  examples/vhost/virtio_net.c                              | 1 +
>  examples/vhost_blk/vhost_blk.c                           | 1 +

We are missing an update of vm_power_manager example:

../../../dpdk/examples/vm_power_manager/parse.c: In function ‘parse_set’:
../../../dpdk/examples/vm_power_manager/parse.c:28:16: error: implicit
declaration of function ‘isblank’
[-Werror=implicit-function-declaration]
   28 |         while (isblank(*str))
      |                ^~~~~~~
../../../dpdk/examples/vm_power_manager/parse.c:9:1: note: include
‘<ctype.h>’ or provide a declaration of ‘isblank’
    8 | #include "parse.h"
  +++ |+#include <ctype.h>
    9 |


I am surprised the CI did not catch this issue.
I suspect some dependencies (probably libvirt-devel) are not installed
in CI environments.


The following diff seems enough to fix the issue, can you double check?


diff --git a/examples/vm_power_manager/channel_monitor.c
b/examples/vm_power_manager/channel_monitor.c
index 97b8def7ca..5fef268662 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */

+#include <ctype.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/examples/vm_power_manager/guest_cli/parse.c
b/examples/vm_power_manager/guest_cli/parse.c
index 528df6d6f1..6ed2d5cb49 100644
--- a/examples/vm_power_manager/guest_cli/parse.c
+++ b/examples/vm_power_manager/guest_cli/parse.c
@@ -3,9 +3,13 @@
  * Copyright(c) 2014 6WIND S.A.
  */

+#include <ctype.h>
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <rte_log.h>
+
 #include "parse.h"

 /*
diff --git a/examples/vm_power_manager/parse.c
b/examples/vm_power_manager/parse.c
index 8a8dcf05fe..5467035994 100644
--- a/examples/vm_power_manager/parse.c
+++ b/examples/vm_power_manager/parse.c
@@ -3,8 +3,13 @@
  * Copyright(c) 2014 6WIND S.A.
  */

+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
 #include <string.h>
+
 #include <rte_log.h>
+
 #include "parse.h"

 /*


-- 
David Marchand


  parent reply	other threads:[~2022-09-21 11:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 20:50 [PATCH 0/3] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-21 20:50 ` [PATCH 1/3] eal: fix pointer arithmetic with an expression argument Dmitry Kozlyuk
2022-08-22  7:14   ` Morten Brørup
2022-08-21 20:50 ` [PATCH 2/3] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-22  7:24   ` Morten Brørup
2022-08-22 14:06     ` Bruce Richardson
2022-08-21 20:50 ` [PATCH 3/3] eal: deduplicate roundup code Dmitry Kozlyuk
2022-08-22  7:25   ` Morten Brørup
2022-08-22 14:06 ` [PATCH 0/3] eal: small rte_common.h fixes and cleanup Bruce Richardson
2022-08-24  3:52 ` fengchengwen
2022-08-25 15:37 ` [PATCH v2 0/4] " Dmitry Kozlyuk
2022-08-25 15:37   ` [PATCH v2 1/4] eal: fix pointer arithmetic with an expression argument Dmitry Kozlyuk
2022-08-25 15:37   ` [PATCH v2 2/4] eal: deduplicate roundup code Dmitry Kozlyuk
2022-08-25 15:37   ` [PATCH v2 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-25 15:37   ` [PATCH v2 4/4] eal: remove unneeded includes from a public header Dmitry Kozlyuk
2022-08-25 22:33   ` [PATCH v3 0/4] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-25 22:33     ` [PATCH v3 1/4] eal: fix pointer arithmetic with an expression argument Dmitry Kozlyuk
2022-08-25 22:33     ` [PATCH v3 2/4] eal: deduplicate roundup code Dmitry Kozlyuk
2022-08-25 22:33     ` [PATCH v3 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-25 22:33     ` [PATCH v3 4/4] eal: remove unneeded includes from a public header Dmitry Kozlyuk
2022-08-27 11:32     ` [PATCH v4 0/4] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-27 11:32       ` [PATCH v4 1/4] eal: fix pointer arithmetic with an expression argument Dmitry Kozlyuk
2022-08-27 11:32       ` [PATCH v4 2/4] eal: deduplicate roundup code Dmitry Kozlyuk
2022-08-27 11:32       ` [PATCH v4 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-27 11:32       ` [PATCH v4 4/4] eal: remove unneeded includes from a public header Dmitry Kozlyuk
2022-08-29  8:29         ` Bruce Richardson
2022-09-21  9:27         ` David Marchand
2022-09-21 11:37         ` David Marchand [this message]
2022-09-21 13:30       ` [PATCH v4 0/4] eal: small rte_common.h fixes and cleanup David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8zYGoUJhD6eRKGKks=hkHPN4DkDLSwpqCEQ8DBSxZqWhw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=ci@dpdk.org \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).