mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: fsl: dpio: Add prefetch.h includes fixing potential build errors
@ 2024-05-30  6:02 Youling Tang
  0 siblings, 0 replies; only message in thread
From: Youling Tang @ 2024-05-30  6:02 UTC (permalink / raw)
  To: Roy Pledge; +Cc: Li Yang, linux-kernel, kernel test robot, Youling Tang

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-30  6:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30  6:02 [PATCH] soc: fsl: dpio: Add prefetch.h includes fixing potential build errors Youling Tang

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®