raw/ifpga/base: fix build with icc
authorTianfei Zhang <tianfei.zhang@intel.com>
Mon, 14 May 2018 09:58:37 +0000 (17:58 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 May 2018 10:40:11 +0000 (12:40 +0200)
fix compile error on icc compiler

Fixes: 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h

index cd114fb..7a39a58 100644 (file)
@@ -16,16 +16,20 @@ get_port(struct ifpga_hw *hw, u32 port_id)
        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 @@ get_port_feature_by_id(struct ifpga_port_hw *port, u64 id)
 {
        struct feature *feature;
 
-       ifpga_for_each_feature(port, feature) {
+       ifpga_for_each_port_feature(port, feature) {
                if (feature->id == id)
                        return feature;
        }