From: Youling Tang <youling.tang@linux.dev>
To: Roy Pledge <Roy.Pledge@nxp.com>
Cc: Li Yang <leoyang.li@nxp.com>,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>,
Youling Tang <tangyouling@kylinos.cn>
Subject: [PATCH] soc: fsl: dpio: Add prefetch.h includes fixing potential build errors
Date: Thu, 30 May 2024 14:02:09 +0800 [thread overview]
Message-ID: <20240530060209.1074031-1-youling.tang@linux.dev> (raw)
From: Youling Tang <tangyouling@kylinos.cn>
If the architecture does not implement prefetch() specifically, the
following build error occurs:
drivers/soc/fsl/dpio/dpio-service.c: In function 'dpaa2_io_store_next':
>> drivers/soc/fsl/dpio/dpio-service.c:745:17: error: implicit declaration of function 'prefetch'; did you mean 'prefetchw'? [-Werror=implicit-function-declaration]
745 | prefetch(&s->vaddr[s->idx]);
| ^~~~~~~~
| prefetchw
cc1: some warnings being treated as errors
--
drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_dqrr_next_direct':
>> drivers/soc/fsl/dpio/qbman-portal.c:1213:17: error: implicit declaration of function 'prefetch'; did you mean 'prefetchw'? [-Werror=implicit-function-declaration]
1213 | prefetch(qbman_get_cmd(s,
| ^~~~~~~~
| prefetchw
cc1: some warnings being treated as errors
Include the correct header file to fix the problem.
Fixes: f1e250bf3659 ("soc: fsl: dpio: Add prefetch instruction")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405300328.eZmSYZrP-lkp@intel.com/
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
drivers/soc/fsl/dpio/dpio-service.c | 1 +
drivers/soc/fsl/dpio/qbman-portal.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c
index b811446e0fa5..a4692b9ad8d7 100644
--- a/drivers/soc/fsl/dpio/dpio-service.c
+++ b/drivers/soc/fsl/dpio/dpio-service.c
@@ -9,6 +9,7 @@
#include <soc/fsl/dpaa2-io.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/prefetch.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
diff --git a/drivers/soc/fsl/dpio/qbman-portal.c b/drivers/soc/fsl/dpio/qbman-portal.c
index 0a3fb6c115f4..1c0bf04b101c 100644
--- a/drivers/soc/fsl/dpio/qbman-portal.c
+++ b/drivers/soc/fsl/dpio/qbman-portal.c
@@ -7,6 +7,7 @@
#include <asm/cacheflush.h>
#include <linux/io.h>
+#include <linux/prefetch.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <soc/fsl/dpaa2-global.h>
--
2.34.1
reply other threads:[~2024-05-30 6:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240530060209.1074031-1-youling.tang@linux.dev \
--to=youling.tang@linux.dev \
--cc=Roy.Pledge@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=tangyouling@kylinos.cn \
/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®