From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com
 [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 3DECD5A06
 for <dev@dpdk.org>; Tue, 17 Mar 2015 00:30:14 +0100 (CET)
Received: by wibg7 with SMTP id g7so38103846wib.1
 for <dev@dpdk.org>; Mon, 16 Mar 2015 16:30:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=g+pgvNMNvNG4KVJBwr+Y7wrJXpRaRfTC5L5snVTjsh4=;
 b=XnYz0IZtkimgrfiYyQQTlSCtHR0Vm6H4/P58WFd77VWtrHUOZUO03apMqm13Jp4jFR
 BAmDIPsTkkwItFb7d0Va35rcyQP5KWmDe8yU5SU/zRt9ct9PTWZrUb8q37cTtQZeindv
 8jFVkkHVgINZZElmFaxnCB8smq38jQADX8Hi7DZopFYXp5HpeGUwQtrIXPiygB8Ll5w6
 xFQpgRM5OznNLudxvyWcNgcjOhpHEoXZnieLLolFWCbIyz854pw5D6Lj8Uvy9fhLyItJ
 dvivUrgV9DTg711lx5zZUrnyVqMgzJQabZ98wcyzxMY7czjhq6M4daFQv0v5Zqmd0ZZt
 Q0Uw==
X-Gm-Message-State: ALoCoQkFGD4zPZO+1upJiyhH/yQI8PJ2blKOiXWGGRbnplMfQs9VYJMIJCs4P9MkaK9yA610HeEi
X-Received: by 10.180.24.233 with SMTP id x9mr56059678wif.9.1426548614112;
 Mon, 16 Mar 2015 16:30:14 -0700 (PDT)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id gz3sm233970wib.1.2015.03.16.16.30.11
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 16 Mar 2015 16:30:13 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: John McNamara <john.mcnamara@intel.com>
Date: Tue, 17 Mar 2015 00:29:23 +0100
Message-ID: <2590049.SJhoNc6m2k@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; )
In-Reply-To: <20150316175217.GE16238@hmsreliant.think-freely.org>
References: <1426510564-19164-1-git-send-email-john.mcnamara@intel.com>
 <1426525506-19003-1-git-send-email-john.mcnamara@intel.com>
 <20150316175217.GE16238@hmsreliant.think-freely.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] eal: fix Wbad-function-cast warning
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Mar 2015 23:30:14 -0000

2015-03-16 13:52, Neil Horman:
> On Mon, Mar 16, 2015 at 05:05:06PM +0000, John McNamara wrote:
> > Fix a warning when the rte_common.h header is included in a compilation
> > using  -Wbad-function-cast, such as in Open vSwitch where the
> > following warning is emitted repeatedly:
> > 
> >     ../rte_common.h: In function 'rte_is_aligned':
> >     ../rte_common.h:184:9: warning: cast from function call of
> >     type 'uintptr_t' to non-matching type 'void *' [-Wbad-function-cast]
> > 
> > This change fixes the issue in rte_common.h by using the RTE_ALIGN_FLOOR
> > macro to get the aligned floor value with generic type casting.
> > 
> > Also removed the rte_align_floor_int() function and replaced it with
> > the RTE_PTR_ALIGN_FLOOR() macro.
> > 
> > Signed-off-by: John McNamara <john.mcnamara@intel.com>
> 
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks