[dpdk-dev] raw/ifpga/base: fix compile error on ia32 icc compiler
Checks
Commit Message
From: "Zhang, Tianfei" <tianfei.zhang@intel.com>
fix compile error on ia32 icc compiler
Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com>
---
drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xu, Rosen
> Sent: Monday, May 14, 2018 10:59 AM
> To: dev@dpdk.org; thomas@monjalon.net
> Cc: Xu, Rosen <rosen.xu@intel.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; shreyansh.jain@nxp.com;
> Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Zhang, Tianfei <tianfei.zhang@intel.com>;
> Liu, Song <song.liu@intel.com>; Wu, Hao <hao.wu@intel.com>;
> gaetan.rivet@6wind.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] raw/ifpga/base: fix compile error on ia32 icc
> compiler
>
> From: "Zhang, Tianfei" <tianfei.zhang@intel.com>
>
> fix compile error on ia32 icc compiler
This is also applicable for 64-bit icc compilation.
>
> Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver")
> Cc: stable@dpdk.org
No need to cc stable, as this is fixing code from this release.
>
> Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com>
Tested-by: Pablo de Lara <oablo.de.lara.guarch@intel.com>
> > From: "Zhang, Tianfei" <tianfei.zhang@intel.com>
> >
> > fix compile error on ia32 icc compiler
>
> This is also applicable for 64-bit icc compilation.
>
> >
> > Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver")
> > Cc: stable@dpdk.org
>
> No need to cc stable, as this is fixing code from this release.
>
> >
> > Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com>
>
> Tested-by: Pablo de Lara <oablo.de.lara.guarch@intel.com>
Applied, thanks
@@ -16,16 +16,20 @@
return &hw->port[port_id];
}
-#define ifpga_for_each_feature(hw, feature) \
+#define ifpga_for_each_fme_feature(hw, feature) \
for ((feature) = (hw)->sub_feature; \
(feature) < (hw)->sub_feature + (FME_FEATURE_ID_MAX); (feature)++)
+#define ifpga_for_each_port_feature(hw, feature) \
+ for ((feature) = (hw)->sub_feature; \
+ (feature) < (hw)->sub_feature + (PORT_FEATURE_ID_MAX); (feature)++)
+
static inline struct feature *
get_fme_feature_by_id(struct ifpga_fme_hw *fme, u64 id)
{
struct feature *feature;
- ifpga_for_each_feature(fme, feature) {
+ ifpga_for_each_fme_feature(fme, feature) {
if (feature->id == id)
return feature;
}
@@ -38,7 +42,7 @@
{
struct feature *feature;
- ifpga_for_each_feature(port, feature) {
+ ifpga_for_each_port_feature(port, feature) {
if (feature->id == id)
return feature;
}