From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 10A0E28F3 for ; Wed, 23 May 2018 14:10:33 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id n10-v6so8547833wmc.1 for ; Wed, 23 May 2018 05:10:33 -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=0Jrwidru/pXU3hJFdsEsRCIZN+bFIrlklpwI+SuIU9g=; b=jqjFe+s5DUjsh5zNGDvl0uuAapyCkULzFwoIKV334yO2XsHjL3zaitL+caz7CjIhbo ww1ufEQZ1AyXgk3v319dLrXAD8feGgYgT3Rifu+wj70nV401TI+jOg4k6of67SyNxuWo K62N3RrWMx/y46FeTKZn9q14CNGZZ/nhanjJ/PnjiGuh7czngRuG6Gsfecu+9GPgSLbM ynBXSNWDq/dLKQMIBsazckEPmdncFhz13QcmdTtCuA5u93XSuH81qe+IXZnUtwmwyOvs TrSqMDZAnvKGWfB6/XpDk4LkZptqZVC4YD81Cw9CY5L3WkBCg0KTRL8Rki912l+l8UwF k3SA== 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=0Jrwidru/pXU3hJFdsEsRCIZN+bFIrlklpwI+SuIU9g=; b=HVcUTerpXtkbjSjYf+rFjrEUOiZUsYLsjbruMmiKYK5CpoIdnrpqA9uIto6dmmRzi+ JpI2uvUF5AYhbfAFT2yKrWPzN4IC5TBojn0krlvjLzP0QmPfWmJGJRWcEnn5B/uf9dTN +2SLAbxkmpeK0jDXaYlmTZnyBiOdDB/j9KSyo3My5kh7tzMSd65OM2s8UZTOawY6Y/rD 3d5o/6OLncgn0F5nGU9SSXi3lDi0ulbJHcAXhlCvnOELRRGy+9Sz9UVb/wZoLf2Z+PSs UiYWKcw++zdp+1KifybPk0d+ZFZHhSFu0GsPSh4TJxxwPaveEjyFB4J4B+UuBtPeXrUS YmLg== X-Gm-Message-State: ALKqPweAMgA7g6FRBGv2jTY4p2k6xh2BEnwjUdFkfLaoCwu6hAupALCQ sLYCDzaNViSxCdPOQapHqZE= X-Google-Smtp-Source: AB8JxZqeFcTjSBTe4QKfk0txxS6X+XiMcmr7YphRt9IXre/B7/sokXhuimh4RkMFTw8HBW+ZwfgeZQ== X-Received: by 2002:a1c:551:: with SMTP id 78-v6mr3831855wmf.60.1527077432670; Wed, 23 May 2018 05:10:32 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id f3-v6sm307107wmf.38.2018.05.23.05.10.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:31 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: dpdk stable Date: Wed, 23 May 2018 13:09:21 +0100 Message-Id: <20180523121010.8385-10-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 'eal: explicit cast in constant byte swap' 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:33 -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 e911551b9d59bb551c6bf39b468d1d6be1abbfb2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:50:37 +0800 Subject: [PATCH] eal: explicit cast in constant byte swap [ upstream commit c7bf8093820b0d740e15f166c3fceb1edb2b2a83 ] GCC 8.1 warns: rte_byteorder.h: In function 'rte_constant_bswap16': rte_byteorder.h:54:45: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] ((((uint16_t)(v) & UINT16_C(0x00ff)) << 8) | \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ (((uint16_t)(v) & UINT16_C(0xff00)) >> 8)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rte_byteorder.h:126:9: note: in expansion of macro 'RTE_STATIC_BSWAP16' return RTE_STATIC_BSWAP16(x); ^~~~~~~~~~~~~~~~~~ The other two sizes are going to be afflicted the same, so get the same fix. Fixes: b75667ef9f7e ("eal: add static endianness conversion macros") Signed-off-by: Andy Green --- lib/librte_eal/common/include/generic/rte_byteorder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h index 9bed85cca..7d9a1463c 100644 --- a/lib/librte_eal/common/include/generic/rte_byteorder.h +++ b/lib/librte_eal/common/include/generic/rte_byteorder.h @@ -123,7 +123,7 @@ typedef uint64_t rte_le64_t; /**< 64-bit little-endian value. */ static inline uint16_t rte_constant_bswap16(uint16_t x) { - return RTE_STATIC_BSWAP16(x); + return (uint16_t)RTE_STATIC_BSWAP16(x); } /* @@ -135,7 +135,7 @@ rte_constant_bswap16(uint16_t x) static inline uint32_t rte_constant_bswap32(uint32_t x) { - return RTE_STATIC_BSWAP32(x); + return (uint32_t)RTE_STATIC_BSWAP32(x); } /* @@ -147,7 +147,7 @@ rte_constant_bswap32(uint32_t x) static inline uint64_t rte_constant_bswap64(uint64_t x) { - return RTE_STATIC_BSWAP64(x); + return (uint64_t)RTE_STATIC_BSWAP64(x); } -- 2.14.2