From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by dpdk.org (Postfix) with ESMTP id 34CB81BB3D for ; Thu, 10 May 2018 21:18:45 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id g20-v6so1375563pgv.1 for ; Thu, 10 May 2018 12:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9NwVp8K0IB/hkt9bGdTuFrHAMA0V6R7Bj4h2VuxFmvw=; b=Ta3kjOzium4qqGXiu1NhqzHb1KppNBu1rs52Q6/UmnDZDfBcXh6NgmGk/gTCQ+TF3G L0jLqAqJMj6OUG+TmRGMnS1sR15cYOACbCmM2+R1AsfL8y4U/vn1f5fzDc5DIr+Jlu9i 2qrFcPMthtHsnF2CaP7vF5vX/ASTnqz1MQf8ZL5gh2Xdk0r9Xri+8Bxj46PO6pDc7k2S 9wjAQFYlEurvGG8mOra3pBDmclZ70AMa2a66lacgLYVupWNJhWk8tXXyr+QyY7ArOKX/ KRp1jFJf7VPXzHSuovv3+Yv4FTLuQwG+PP0zKPe2/wg1oxTmVg9c0JsYD1GkLGaln0xp 0KnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9NwVp8K0IB/hkt9bGdTuFrHAMA0V6R7Bj4h2VuxFmvw=; b=rg6UGzKnU3i7OgewMtDCQmwnhIxpZDFTJgnuUGw2IhryBtE/LEEHT8Wnq3OJ/W8H3K OH2ul1WD/wioCXYuvtUkLgyIk0snuMk9E4llJez5gTuIEJunXEekcKLbdSakSXuwVAXH 7pIC7WjtqTsIJSbp3eRToUf37QDbUyz0H8Ms9jx/mj7ClA9OfdiFyXLEAjYrdf7Clauc F0/JRUhX4MLUu90u1IM/OgrZf15odp3VKHbGVNRbdj97A6CYED/2mbNwBpm7djg0vYYK SCDSdALOWiVH9eP/mOHk6r5Aq/kMQuZNOq0soW2VAKIczoDfWPaV8D/ahc6oxXeLMC2b +Ogg== X-Gm-Message-State: ALKqPwcYp0Fue59HGVRHQMXMBa3TaUVmnhTZbh85K1BNfjUr6WC8GVRw Vge6LgISDxbFnJPr4/iClms0qucDxNY= X-Google-Smtp-Source: AB8JxZrpHvEaTFV9TWvoweIXapZUALNyvAw8x+0A1j2VzOj2EwUbOhrX//n7dwkQk79iui4q2pWUuQ== X-Received: by 2002:a62:415d:: with SMTP id o90-v6mr2529504pfa.140.1525979924322; Thu, 10 May 2018 12:18:44 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id k13-v6sm4203710pfj.186.2018.05.10.12.18.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 12:18:44 -0700 (PDT) Date: Thu, 10 May 2018 12:18:41 -0700 From: Stephen Hemminger To: Andy Green Cc: dev@dpdk.org Message-ID: <20180510121841.42ed97fd@xeon-e3> In-Reply-To: <152592056030.119328.10575471783991783458.stgit@localhost.localdomain> References: <152591991920.119328.14523975619615362920.stgit@localhost.localdomain> <152592056030.119328.10575471783991783458.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 36/40] rte_ethdev.h: explicit cast for return type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 19:18:45 -0000 On Thu, 10 May 2018 10:49:20 +0800 Andy Green wrote: > /projects/lagopus/src/dpdk/build/include/rte_ethdev.h:3860:10: > warning: conversion to 'int' from 'uint32_t' {aka 'unsigned int'} > may change the sign of the result [-Wsign-conversion] > return (*dev->dev_ops->rx_queue_count)(dev, queue_id); > > Signed-off-by: Andy Green > --- > lib/librte_ethdev/rte_ethdev.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > index 2487e1d2d..c84dc44b8 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -3857,7 +3857,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id) > if (queue_id >= dev->data->nb_rx_queues) > return -EINVAL; > > - return (*dev->dev_ops->rx_queue_count)(dev, queue_id); > + return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id); > } > > /** > Why not change rx_queue_count to int to allow drivers to return an error?