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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
tianfei.zhang@intel.com, russell.h.weight@intel.com,
matthew.gerlach@linux.intel.com, marpagan@redhat.com,
lgoncalv@redhat.com, Peter Colberg <peter.colberg@intel.com>
Subject: [PATCH 2/2] fpga: dfl: omit unneeded casts of u64 values for dev_dbg()
Date: Tue, 4 Jul 2023 22:54:51 -0400 [thread overview]
Message-ID: <0cffb04a207a98148c61f512aa4dc90880e51251.1687301688.git.peter.colberg@intel.com> (raw)
In-Reply-To: <cover.1687301688.git.peter.colberg@intel.com>
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 --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(®ion->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;
}
--
2.28.0
prev parent reply other threads:[~2023-07-05 2:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 2:54 [PATCH 0/2] fpga: dfl: clean up string formatting for sysfs_emit() and dev_dbg() Peter Colberg
2023-07-05 2:54 ` [PATCH 1/2] fpga: dfl: use sysfs_emit() to format sysfs values Peter Colberg
2023-07-10 7:45 ` Xu Yilun
2023-07-05 2:54 ` Peter Colberg [this message]
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=0cffb04a207a98148c61f512aa4dc90880e51251.1687301688.git.peter.colberg@intel.com \
--to=peter.colberg@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hao.wu@intel.com \
--cc=lgoncalv@redhat.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=russell.h.weight@intel.com \
--cc=tianfei.zhang@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®