diff options
author | Xu Yilun <yilun.xu@intel.com> | 2020-08-10 04:41:10 +0200 |
---|---|---|
committer | Moritz Fischer <mdf@kernel.org> | 2020-08-20 06:05:47 +0200 |
commit | 8a5de2de0339cdb7bd269140f857b62ba7222759 (patch) | |
tree | 06b3f4b6cb90fcb9fe2b1da91c967abd53924443 /drivers/fpga/dfl.h | |
parent | MAINTAINERS: Add Tom Rix as fpga reviewer (diff) | |
download | linux-8a5de2de0339cdb7bd269140f857b62ba7222759.tar.xz linux-8a5de2de0339cdb7bd269140f857b62ba7222759.zip |
fpga: dfl: change data type of feature id to u16
The feature id is stored in a 12 bit field in DFH. So a u16 variable is
enough for feature id.
This patch changes all feature id related places to fit u16.
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Diffstat (limited to 'drivers/fpga/dfl.h')
-rw-r--r-- | drivers/fpga/dfl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl.h index a32dfba2a88b..bc619426a3b7 100644 --- a/drivers/fpga/dfl.h +++ b/drivers/fpga/dfl.h @@ -197,7 +197,7 @@ int dfl_fpga_check_port_id(struct platform_device *pdev, void *pport_id); * @id: unique dfl private feature id. */ struct dfl_feature_id { - u64 id; + u16 id; }; /** @@ -240,7 +240,7 @@ struct dfl_feature_irq_ctx { */ struct dfl_feature { struct platform_device *dev; - u64 id; + u16 id; int resource_index; void __iomem *ioaddr; struct dfl_feature_irq_ctx *irq_ctx; @@ -365,7 +365,7 @@ struct platform_device *dfl_fpga_inode_to_feature_dev(struct inode *inode) (feature) < (pdata)->features + (pdata)->num; (feature)++) static inline -struct dfl_feature *dfl_get_feature_by_id(struct device *dev, u64 id) +struct dfl_feature *dfl_get_feature_by_id(struct device *dev, u16 id) { struct dfl_feature_platform_data *pdata = dev_get_platdata(dev); struct dfl_feature *feature; @@ -378,7 +378,7 @@ struct dfl_feature *dfl_get_feature_by_id(struct device *dev, u64 id) } static inline -void __iomem *dfl_get_feature_ioaddr_by_id(struct device *dev, u64 id) +void __iomem *dfl_get_feature_ioaddr_by_id(struct device *dev, u16 id) { struct dfl_feature *feature = dfl_get_feature_by_id(dev, id); @@ -389,7 +389,7 @@ void __iomem *dfl_get_feature_ioaddr_by_id(struct device *dev, u64 id) return NULL; } -static inline bool is_dfl_feature_present(struct device *dev, u64 id) +static inline bool is_dfl_feature_present(struct device *dev, u16 id) { return !!dfl_get_feature_ioaddr_by_id(dev, id); } |