From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2EA4CA0547; Fri, 12 Mar 2021 13:51:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F42A160890; Fri, 12 Mar 2021 13:51:51 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 17EBC406FF for ; Fri, 12 Mar 2021 13:51:49 +0100 (CET) IronPort-SDR: w9MVIaxRJjoLhwpH8kiISnEvTToQ0Ip0o47GlvIipBfAipKgsIO9TKLJV6x6OdMwTX3yJtS+1L ag2j4ZFtHA0Q== X-IronPort-AV: E=McAfee;i="6000,8403,9920"; a="208667411" X-IronPort-AV: E=Sophos;i="5.81,243,1610438400"; d="scan'208";a="208667411" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 04:51:48 -0800 IronPort-SDR: 15sdvF3+O2yowTNFlqhHSJ8ywRqG+W9Jn5WCRuJrdR1xXs0CPyrULRDl6vUsO80Iya/pzjUuAr A4G3lXLipYjQ== X-IronPort-AV: E=Sophos;i="5.81,243,1610438400"; d="scan'208";a="404406973" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.21.107]) ([10.252.21.107]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 04:51:47 -0800 To: Tyler Retzlaff , dev@dpdk.org Cc: david.hunt@intel.com References: <1615333490-15243-1-git-send-email-roretzla@linux.microsoft.com> From: "Burakov, Anatoly" Message-ID: <9ab8e965-b2ec-d554-d167-e3ed62ed62de@intel.com> Date: Fri, 12 Mar 2021 12:51:46 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <1615333490-15243-1-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal, power: don't use '-' sign with unsigned literals X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09-Mar-21 11:44 PM, Tyler Retzlaff wrote: > use ~0ULL instead of -1ULL to avoid contridctory application of '-' sign > to integer literal where the desired type is unsigned. > > Signed-off-by: Tyler Retzlaff > --- Not sure i agree. It's a very common pattern and is widely used and understood. I mean, if anything, seeing `~0` would have me stop and think as i've literally never seen such code before. -- Thanks, Anatoly