From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id A20A35934 for ; Fri, 26 Jul 2013 15:21:28 +0200 (CEST) Received: by mail-wi0-f174.google.com with SMTP id j17so239451wiw.13 for ; Fri, 26 Jul 2013 06:21:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id:x-gm-message-state; bh=dzolRUfyFKuL7K9usSTK68gDuX6UrZSVvuPX+pwBIkw=; b=J2ejYlm9RrG2ELGE+RUVzKwiS79BC3pmg618Ky10+puAjrJWqoq57SWKS+mFzHqIKM HULFDLKvHy9uBeeGJd6Rf/sJhdQ/QQ3kud4Nyf9KZJf8Cw063qp3t8paBpMo0eH7G2Fn KyUrmj6A05z29gOIztQlBEpTZH8OyP3nZBMPPW9NqfV49O3sAWAxvLyI8CikveaIzuk7 NBLOOKixoA5amBHZyedmhLWJcALclhRKE1JnROHSzTFKs/YqQUszhAl3quhjr1FXy3XK eAbBGsG5BzSz2L4RzXwrAfkHx5caluTtgTR5jIot4/ZYqOmPLtpVVotVQ+Os3I54xvY7 8GkA== X-Received: by 10.194.110.39 with SMTP id hx7mr34391627wjb.4.1374844911360; Fri, 26 Jul 2013 06:21:51 -0700 (PDT) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id z2sm4684191wiv.11.2013.07.26.06.21.49 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 06:21:50 -0700 (PDT) From: Thomas Monjalon Organization: 6WIND To: Adrien Mazarguil Date: Fri, 26 Jul 2013 15:21:48 +0200 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <1374838440-21429-1-git-send-email-thomas.monjalon@6wind.com> <20130726121244.GK7849@6wind.com> In-Reply-To: <20130726121244.GK7849@6wind.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201307261521.48620.thomas.monjalon@6wind.com> X-Gm-Message-State: ALoCoQmpKaQhXfNHiH+jZBYfY4CJRDYEss2coJnpYBYW2JwPhpBwQkiRdilMaJM4udMUIjR3ZEik 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 13:21:28 -0000 26/07/2013 14:12, Adrien Mazarguil : > 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 pushed -- Thomas