diff mbox series

[2/2] fpga: dfl: omit unneeded casts of u64 values for dev_dbg()

Message ID 0cffb04a207a98148c61f512aa4dc90880e51251.1687301688.git.peter.colberg@intel.com (mailing list archive)
State Superseded
Headers show
Series fpga: dfl: clean up string formatting for sysfs_emit() and dev_dbg() | expand

Commit Message

Peter Colberg July 5, 2023, 2:54 a.m. UTC
Omit unneeded casts of u64 values to unsigned long long for use with
printk() format specifier %llx. Unlike user space, the kernel defines
u64 as unsigned long long for all architectures; see commit 2a7930bd77fe
("Documentation/printk-formats.txt: No casts needed for u64/s64").

These changes are cosmetic only; no functional changes.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/fpga/dfl-afu-dma-region.c | 14 ++++++--------
 drivers/fpga/dfl-afu-main.c       |  4 +---
 drivers/fpga/dfl-fme-mgr.c        |  5 ++---
 3 files changed, 9 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c
index 02b60fde0430..71ed9d394d07 100644
--- a/drivers/fpga/dfl-afu-dma-region.c
+++ b/drivers/fpga/dfl-afu-dma-region.c
@@ -146,8 +146,7 @@  static int afu_dma_region_add(struct dfl_feature_platform_data *pdata,
 	struct dfl_afu *afu = dfl_fpga_pdata_get_private(pdata);
 	struct rb_node **new, *parent = NULL;
 
-	dev_dbg(&pdata->dev->dev, "add region (iova = %llx)\n",
-		(unsigned long long)region->iova);
+	dev_dbg(&pdata->dev->dev, "add region (iova = %llx)\n", region->iova);
 
 	new = &afu->dma_regions.rb_node;
 
@@ -187,8 +186,7 @@  static void afu_dma_region_remove(struct dfl_feature_platform_data *pdata,
 {
 	struct dfl_afu *afu;
 
-	dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n",
-		(unsigned long long)region->iova);
+	dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n", region->iova);
 
 	afu = dfl_fpga_pdata_get_private(pdata);
 	rb_erase(&region->node, &afu->dma_regions);
@@ -210,7 +208,7 @@  void afu_dma_region_destroy(struct dfl_feature_platform_data *pdata)
 		region = container_of(node, struct dfl_afu_dma_region, node);
 
 		dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n",
-			(unsigned long long)region->iova);
+			region->iova);
 
 		rb_erase(node, &afu->dma_regions);
 
@@ -255,7 +253,7 @@  afu_dma_region_find(struct dfl_feature_platform_data *pdata, u64 iova, u64 size)
 
 		if (dma_region_check_iova(region, iova, size)) {
 			dev_dbg(dev, "find region (iova = %llx)\n",
-				(unsigned long long)region->iova);
+				region->iova);
 			return region;
 		}
 
@@ -268,8 +266,8 @@  afu_dma_region_find(struct dfl_feature_platform_data *pdata, u64 iova, u64 size)
 			break;
 	}
 
-	dev_dbg(dev, "region with iova %llx and size %llx is not found\n",
-		(unsigned long long)iova, (unsigned long long)size);
+	dev_dbg(dev, "region with iova %llx and size %llx is not found\n", iova,
+		size);
 
 	return NULL;
 }
diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
index 51fdbe8a2f26..f81b44767c31 100644
--- a/drivers/fpga/dfl-afu-main.c
+++ b/drivers/fpga/dfl-afu-main.c
@@ -729,9 +729,7 @@  afu_ioctl_dma_map(struct dfl_feature_platform_data *pdata, void __user *arg)
 	}
 
 	dev_dbg(&pdata->dev->dev, "dma map: ua=%llx, len=%llx, iova=%llx\n",
-		(unsigned long long)map.user_addr,
-		(unsigned long long)map.length,
-		(unsigned long long)map.iova);
+		map.user_addr, map.length, map.iova);
 
 	return 0;
 }
diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c
index af0785783b52..7fb7a0aca1dc 100644
--- a/drivers/fpga/dfl-fme-mgr.c
+++ b/drivers/fpga/dfl-fme-mgr.c
@@ -150,7 +150,7 @@  static int fme_mgr_write_init(struct fpga_manager *mgr,
 	priv->pr_error = fme_mgr_pr_error_handle(fme_pr);
 	if (priv->pr_error)
 		dev_dbg(dev, "previous PR error detected %llx\n",
-			(unsigned long long)priv->pr_error);
+			priv->pr_error);
 
 	dev_dbg(dev, "set PR port ID\n");
 
@@ -242,8 +242,7 @@  static int fme_mgr_write_complete(struct fpga_manager *mgr,
 	dev_dbg(dev, "PR operation complete, checking status\n");
 	priv->pr_error = fme_mgr_pr_error_handle(fme_pr);
 	if (priv->pr_error) {
-		dev_dbg(dev, "PR error detected %llx\n",
-			(unsigned long long)priv->pr_error);
+		dev_dbg(dev, "PR error detected %llx\n", priv->pr_error);
 		return -EIO;
 	}