diff mbox

[ovs-dev] dpdk: fix compiler warnings on 32bit build

Message ID 1442956410-1291-1-git-send-email-azhou@nicira.com
State Accepted
Headers show

Commit Message

Andy Zhou Sept. 22, 2015, 9:13 p.m. UTC
Those changes prevent compiler warnings.

Signed-off-by: Andy Zhou <azhou@nicira.com>
---
 lib/netdev-dpdk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Pravin B Shelar Sept. 24, 2015, 6:07 p.m. UTC | #1
On Tue, Sep 22, 2015 at 2:13 PM, Andy Zhou <azhou@nicira.com> wrote:
> Those changes prevent compiler warnings.
>
> Signed-off-by: Andy Zhou <azhou@nicira.com>
> ---
>  lib/netdev-dpdk.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index e4e3d2c..e7eb526 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -1785,13 +1785,13 @@ new_device(struct virtio_net *dev)
>      ovs_mutex_unlock(&dpdk_mutex);
>
>      if (!exists) {
> -        VLOG_INFO("vHost Device '%s' (%ld) can't be added - name not found",
> +        VLOG_INFO("vHost Device '%s' (%lld) can't be added - name not found",
>                     dev->ifname, dev->device_fh);
>
>          return -1;
>      }
>
> -    VLOG_INFO("vHost Device '%s' (%ld) has been added",
> +    VLOG_INFO("vHost Device '%s' (%lld) has been added",
>                 dev->ifname, dev->device_fh);
>      return 0;
>  }
> @@ -1830,7 +1830,7 @@ destroy_device(volatile struct virtio_net *dev)
>      }
>      ovs_mutex_unlock(&dpdk_mutex);
>
> -    VLOG_INFO("vHost Device '%s' (%ld) has been removed",
> +    VLOG_INFO("vHost Device '%s' (%lld) has been removed",
>                 dev->ifname, dev->device_fh);
>  }
>
device_fh is defined as uint64_t. So printing format macro PRIu64 can be used.
Otherwise looks good.

Acked-by: Pravin B Shelar <pshelar@nicira.com>
Andy Zhou Sept. 24, 2015, 6:38 p.m. UTC | #2
> device_fh is defined as uint64_t. So printing format macro PRIu64 can be used.
> Otherwise looks good.
PRIu64 is better. Thanks.
>
> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Thanks, will push to master with this change.
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index e4e3d2c..e7eb526 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1785,13 +1785,13 @@  new_device(struct virtio_net *dev)
     ovs_mutex_unlock(&dpdk_mutex);
 
     if (!exists) {
-        VLOG_INFO("vHost Device '%s' (%ld) can't be added - name not found",
+        VLOG_INFO("vHost Device '%s' (%lld) can't be added - name not found",
                    dev->ifname, dev->device_fh);
 
         return -1;
     }
 
-    VLOG_INFO("vHost Device '%s' (%ld) has been added",
+    VLOG_INFO("vHost Device '%s' (%lld) has been added",
                dev->ifname, dev->device_fh);
     return 0;
 }
@@ -1830,7 +1830,7 @@  destroy_device(volatile struct virtio_net *dev)
     }
     ovs_mutex_unlock(&dpdk_mutex);
 
-    VLOG_INFO("vHost Device '%s' (%ld) has been removed",
+    VLOG_INFO("vHost Device '%s' (%lld) has been removed",
                dev->ifname, dev->device_fh);
 }