All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Colberg <peter.colberg@intel.com>
To: Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>,
	Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Russ Weight <russ.weight@linux.dev>,
	Marco Pagani <marpagan@redhat.com>,
	Matthew Gerlach <matthew.gerlach@linux.intel.com>,
	Peter Colberg <peter.colberg@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH RESEND] fpga: dfl: omit unneeded casts of u64 values for dev_dbg()
Date: Thu, 28 Mar 2024 20:04:29 -0400	[thread overview]
Message-ID: <20240329000429.7493-1-peter.colberg@intel.com> (raw)

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>
---
This is an unmodified resend of the second patch only from the series
"fpga: dfl: clean up string formatting for sysfs_emit() and dev_dbg()".

Link: https://patchwork.kernel.org/project/linux-fpga/patch/0cffb04a207a98148c61f512aa4dc90880e51251.1687301688.git.peter.colberg@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 --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 c0a75ca360d6..4342d40a2106 100644
--- a/drivers/fpga/dfl-afu-main.c
+++ b/drivers/fpga/dfl-afu-main.c
@@ -730,9 +730,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 ab228d8837a0..da3cb9c35de5 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;
 	}
 
-- 
2.44.0


             reply	other threads:[~2024-03-29  0:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  0:04 Peter Colberg [this message]
2024-04-02  3:29 ` [PATCH RESEND] fpga: dfl: omit unneeded casts of u64 values for dev_dbg() Xu Yilun
2024-04-02 19:24   ` Colberg, Peter
2024-04-18 21:30   ` Colberg, Peter
2024-04-19  9:05     ` Xu Yilun
2024-04-19 19:14       ` Colberg, Peter
2024-04-19 13:24     ` andriy.shevchenko
2024-04-19 19:19       ` Colberg, Peter
2024-04-22 11:08         ` andriy.shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240329000429.7493-1-peter.colberg@intel.com \
    --to=peter.colberg@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=matthew.gerlach@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.