From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 4CD8228F3 for ; Wed, 23 May 2018 14:10:37 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id m129-v6so8492496wmb.3 for ; Wed, 23 May 2018 05:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c9FKcSxf65Llbl10aJ4nGPrb2+YzHL+GzWYsqnYQ+jo=; b=nmdY64nD5lsw0r0tXxBw16uNS+mlciXtEfiIw5dNnV5c2wO6vmQr/dXbV0AefC922s fhIVL+qm/rrbU8RdsDS3kIvg2xXMENjmnz83QFMIlt5+GugK5zrrTjfT+QruLAf7VE3Q BCw8rhmvSvEtsLm+0zGYbFBvKB58e9HYC/wjxeBxx3NQmwe2OyOPMNzTqzvWp8v1BWuq SvCWCgLcR8k130zQ3dhBCpjrW6D/87JXM7uAaPPPUk9QA+t0EPrtDSh92RjzG8ewR0d/ lCoP7vOR36r+DvyIlzoj9OmUlpe6TbHR7lLjzkS/vDJJoEm08MsGxUVN2T3hfhCGqAQ5 ddMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c9FKcSxf65Llbl10aJ4nGPrb2+YzHL+GzWYsqnYQ+jo=; b=A+3H5dIyHHio5dU+iGUaCoVDjE3O4aJaQ4j/lF7fzDY5ZeizBsHTQAe0B504cWzI5S I4gfAK6isBpY+QBvxLiwnRxN0qTmz/ZqclrHz/G2aLWHupI4PFNrU4qkRhTxOC0F4vv9 SZspfNUL8HTDxAozIbmKAISLFIkyCDRZKmhaZWFeIQxi8Szof2/24OZett+Xzxu3kMsl U9Yni781MLPmPPVR5McJLVP3z1sUkloyzuyfia4/NzqmVFyzVB9fBkmcpvwUPvYCc2MT FrX9yml/CBZHgQGbw6g2z6DanZuSPIBlNy0f2fBX0tKQNH6vQZ1clzmSDZZyt8sxcwya 72eA== X-Gm-Message-State: ALKqPwcwafpx3JzWGz+rGBKIHIo5E2pvHx/gx13G3mV1lk4e95eQ3N10 pwyCN9m1v4Crlnp2mUcPsIQ= X-Google-Smtp-Source: AB8JxZrS4JOQffIg0/q59adpNdHTx6hZevlZnKPSBp/cmnsVcheJ6X9qvnaut9vRhuvc/M3UwSdB5g== X-Received: by 2002:a1c:459a:: with SMTP id l26-v6mr4687253wmi.95.1527077436835; Wed, 23 May 2018 05:10:36 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id e7-v6sm19828131wrn.88.2018.05.23.05.10.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:35 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Olivier Matz , dpdk stable Date: Wed, 23 May 2018 13:09:23 +0100 Message-Id: <20180523121010.8385-12-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180523121010.8385-1-luca.boccassi@gmail.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'ring: remove signed type flip-flopping' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 12:10:37 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/25/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From fd0d1abc83939595cb6a5dd3b21f9d9eec4d4178 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:49:22 +0800 Subject: [PATCH] ring: remove signed type flip-flopping [ upstream commit e8ed5056c8747cd5d95a41749e48987ad44dc9b3 ] GCC 8.1 warns: rte_ring.h:350:46: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] update_tail(&r->prod, prod_head, prod_next, is_sp, 1); The visible apis take unsigned int, then call a private api taking an int, which finally calls an api taking an unsigned int. Convert the private api to take unsigned int removing 5 x warning similar to that shown above. Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation") Signed-off-by: Andy Green Acked-by: Olivier Matz --- lib/librte_ring/rte_ring.h | 4 ++-- lib/librte_ring/rte_ring_c11_mem.h | 2 +- lib/librte_ring/rte_ring_generic.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index 253cdc96a..91b3657a3 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -339,7 +339,7 @@ void rte_ring_dump(FILE *f, const struct rte_ring *r); static __rte_always_inline unsigned int __rte_ring_do_enqueue(struct rte_ring *r, void * const *obj_table, unsigned int n, enum rte_ring_queue_behavior behavior, - int is_sp, unsigned int *free_space) + unsigned int is_sp, unsigned int *free_space) { uint32_t prod_head, prod_next; uint32_t free_entries; @@ -381,7 +381,7 @@ end: static __rte_always_inline unsigned int __rte_ring_do_dequeue(struct rte_ring *r, void **obj_table, unsigned int n, enum rte_ring_queue_behavior behavior, - int is_sc, unsigned int *available) + unsigned int is_sc, unsigned int *available) { uint32_t cons_head, cons_next; uint32_t entries; diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h index 08825ea5b..cb3f82b1a 100644 --- a/lib/librte_ring/rte_ring_c11_mem.h +++ b/lib/librte_ring/rte_ring_c11_mem.h @@ -51,7 +51,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, * If behavior == RTE_RING_QUEUE_FIXED, this will be 0 or n only. */ static __rte_always_inline unsigned int -__rte_ring_move_prod_head(struct rte_ring *r, int is_sp, +__rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp, unsigned int n, enum rte_ring_queue_behavior behavior, uint32_t *old_head, uint32_t *new_head, uint32_t *free_entries) diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h index c2d482bc9..ea7dbe5b9 100644 --- a/lib/librte_ring/rte_ring_generic.h +++ b/lib/librte_ring/rte_ring_generic.h @@ -53,7 +53,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, * If behavior == RTE_RING_QUEUE_FIXED, this will be 0 or n only. */ static __rte_always_inline unsigned int -__rte_ring_move_prod_head(struct rte_ring *r, int is_sp, +__rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp, unsigned int n, enum rte_ring_queue_behavior behavior, uint32_t *old_head, uint32_t *new_head, uint32_t *free_entries) @@ -123,7 +123,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, int is_sp, * If behavior == RTE_RING_QUEUE_FIXED, this will be 0 or n only. */ static __rte_always_inline unsigned int -__rte_ring_move_cons_head(struct rte_ring *r, int is_sc, +__rte_ring_move_cons_head(struct rte_ring *r, unsigned int is_sc, unsigned int n, enum rte_ring_queue_behavior behavior, uint32_t *old_head, uint32_t *new_head, uint32_t *entries) -- 2.14.2