Skip to contentSkip to conversation

reset: starfive-jh7100: Fix 32bit compilation

PATCH Applied Emil Renner Berthing 3 participants 3 messages Dec 20, 2021 – Dec 21, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: starfive-jh7100: Fix 32bit compilation

We need to include linux/io-64-nonatomic-lo-hi.h or readq/writeq won't be defined when compiling on 32bit architectures:

On i386:

../drivers/reset/reset-starfive-jh7100.c: In function ‘jh7100_reset_update’:
../drivers/reset/reset-starfive-jh7100.c:81:10: error: implicit declaration of function ‘readq’; did you mean ‘readl’? [-Werror=implicit-function-declaration]

  value = readq(reg_assert);
           ^~~~~

../drivers/reset/reset-starfive-jh7100.c:86:2: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration]
writeq(value, reg_assert);
^~~~~~

On m68k:

drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration] drivers/reset/reset-starfive-jh7100.c:86:9: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:289: drivers/reset/reset-starfive-jh7100.o] Error 1
make[2]: *** [scripts/Makefile.build:572: drivers/reset] Error 2
make[1]: *** [Makefile:1969: drivers] Error 2
make: *** [Makefile:226: __sub-make] Error 2

Fixes 0be3a1595bf8 ("reset: starfive-jh7100: Add StarFive JH7100 reset driver")
---
 drivers/reset/reset-starfive-jh7100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-starfive-jh7100.c +1 -0
index e28a19d271cb..fc44b2fb3e03 100644
@@ -7,6 +7,7 @@
 
 #include <linux/bitmap.h>
 #include <linux/io.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/iopoll.h>
 #include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
Signature · 1 line
2.33.1
#1 lore raw
This patch was applied to soc/soc.git (for-next) by Arnd Bergmann <[email protected]>:

Hello:

This patch was applied to soc/soc.git (for-next)
by Arnd Bergmann <[email protected]>:

Quoted 7 lines · On Mon, 20 Dec 2021 13:17:59 +0100 you wrote:

We need to include linux/io-64-nonatomic-lo-hi.h or readq/writeq won't be defined when compiling on 32bit architectures:

On i386:

../drivers/reset/reset-starfive-jh7100.c: In function ‘jh7100_reset_update’:
../drivers/reset/reset-starfive-jh7100.c:81:10: error: implicit declaration of function ‘readq’; did you mean ‘readl’? [-Werror=implicit-function-declaration]

Quoted 7 lines
  value = readq(reg_assert);
           ^~~~~

../drivers/reset/reset-starfive-jh7100.c:86:2: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration]
writeq(value, reg_assert);
^~~~~~

[...]

Here is the summary with links:
- [-next] reset: starfive-jh7100: Fix 32bit compilation

    https://git.kernel.org/soc/soc/c/299e6f788eab

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Acked-by on v1 1/1
#2 lore raw
In reply to Emil Renner Berthing
Quoted 23 lines · Emil Renner Berthing

We need to include linux/io-64-nonatomic-lo-hi.h or readq/writeq won't be defined when compiling on 32bit architectures:

On i386:

../drivers/reset/reset-starfive-jh7100.c: In function ‘jh7100_reset_update’:
../drivers/reset/reset-starfive-jh7100.c:81:10: error: implicit declaration of function ‘readq’; did you mean ‘readl’? [-Werror=implicit-function-declaration]

  value = readq(reg_assert);
           ^~~~~

../drivers/reset/reset-starfive-jh7100.c:86:2: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration]
writeq(value, reg_assert);
^~~~~~

On m68k:

drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration] drivers/reset/reset-starfive-jh7100.c:86:9: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:289: drivers/reset/reset-starfive-jh7100.o] Error 1
make[2]: *** [scripts/Makefile.build:572: drivers/reset] Error 2
make[1]: *** [Makefile:1969: drivers] Error 2
make: *** [Makefile:226: __sub-make] Error 2

Quoted 3 lines
Fixes 0be3a1595bf8 ("reset: starfive-jh7100: Add StarFive JH7100 reset driver")

Thanks.

Quoted 16 lines
---
 drivers/reset/reset-starfive-jh7100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-starfive-jh7100.c +1 -0
index e28a19d271cb..fc44b2fb3e03 100644
@@ -7,6 +7,7 @@
 
 #include <linux/bitmap.h>
 #include <linux/io.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/iopoll.h>
 #include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
Signature · 1 line
~Randy