From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id C687658EE for ; Fri, 26 Jul 2013 14:12:24 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id u57so1791228wes.37 for ; Fri, 26 Jul 2013 05:12:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=R2uBMVeb3BIWF6UQLePF5hOt2H+wnrWIHD+VY1NvXOo=; b=eJNOaDqsG5fZi+VxiSfhnUJ6jBD7kBQ5qzzYpdi+on8eIPfZbZHNaC/iHCS9NizJFW uGAY4LyCUWQW2SjPwK8/AVzdAjTIiuGVXWwomSe+fwWM3RwQzh6BQ7+DeagklT0IB5XV QwyIFZy2ByShmDDyggarPVRlz1sPfZUsZv0Q7GTpg6kT5vJppTtjlaPfhU0jCd1klBqF MlBfkyO8GnKB7/jJ8KHGSq1UNcs8MjjfYW5uNDZIPvL1KboTX01kpU+A7vtoDMjvBRK9 kFdZM703hIlYVG4uQfkgBBWgUcq2+SwjbNnRdoP5vARbsLcAIgaLT+lWvuoMrgZcJkVP PFbg== X-Received: by 10.194.242.134 with SMTP id wq6mr33855796wjc.94.1374840767670; Fri, 26 Jul 2013 05:12:47 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id d8sm4394694wiz.0.2013.07.26.05.12.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 26 Jul 2013 05:12:46 -0700 (PDT) Date: Fri, 26 Jul 2013 14:12:44 +0200 From: Adrien Mazarguil To: Thomas Monjalon Message-ID: <20130726121244.GK7849@6wind.com> References: <1374838440-21429-1-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374838440-21429-1-git-send-email-thomas.monjalon@6wind.com> X-Gm-Message-State: ALoCoQmR57McA7HOftay4+oZJFU6NsckKQ1sKndzrqGOO2m4nkxUs+aTolbkS0oQOoNEGSfvkuDk Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: fix type of pointer arithmetic result X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 12:12:25 -0000 On Fri, Jul 26, 2013 at 01:34:00PM +0200, Thomas Monjalon wrote: > Adding or subtracting a value to a pointer makes a new pointer > of unknown type. > So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB(). > > But RTE_PTR_ALIGN_* macros have in their explicit API to return a pointer > of the same type. Since RTE_PTR_ALIGN_CEIL is based on RTE_PTR_ADD, a > typeof() is added to keep the original behaviour. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/common/include/rte_common.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND