Skip to contentSkip to conversation

scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y

PATCH Superseded Anders Roxell 5 participants 9 messages Sep 24, 2021 – Nov 6, 2021

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

PATCH 1/1 scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y

When building an allmodconfig kernel, the following build error shows up:

aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_probe':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177: undefined reference to hwmon_device_register_with_info' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177:(.text+0x510): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_register_with_info'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_remove':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195: undefined reference to hwmon_device_unregister' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195:(.text+0x5c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_unregister'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_notify_event':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206:(.text+0x64c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'
aarch64-linux-gnu-ld: /home/anders/src/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209:(.text+0x66c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature notification support")
---
 drivers/scsi/ufs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig +1 -1
index 565e8aa6319d..30c6edb53be9 100644
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
 config SCSI_UFS_HWMON
 	bool "UFS  Temperature Notification"
-	depends on SCSI_UFSHCD && HWMON
+	depends on SCSI_UFSHCD && HWMON=y
 	help
 	  This provides support for UFS hardware monitoring. If enabled,
 	  a hardware monitoring device will be created for the UFS device.
Signature · 1 line
2.33.0
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · Anders Roxell

When building an allmodconfig kernel, the following build error shows up:

aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_probe':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177: undefined reference to hwmon_device_register_with_info' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177:(.text+0x510): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_register_with_info'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_remove':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195: undefined reference to hwmon_device_unregister' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195:(.text+0x5c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_unregister'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_notify_event':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206:(.text+0x64c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'
aarch64-linux-gnu-ld: /home/anders/src/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209:(.text+0x66c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature notification support")
---
  drivers/scsi/ufs/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig +0 -0
index 565e8aa6319d..30c6edb53be9 100644

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 208

Quoted 8 lines
drivers/scsi/ufs/Kconfig +1 -1
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
  config SCSI_UFS_HWMON
  	bool "UFS  Temperature Notification"
-	depends on SCSI_UFSHCD && HWMON
+	depends on SCSI_UFSHCD && HWMON=y
  	help
  	  This provides support for UFS hardware monitoring. If enabled,
  	  a hardware monitoring device will be created for the UFS device.

Thanks.

Signature · 1 line
~Randy
Acked-by
#2 lore raw
Quoted 16 lines
Quoted 16 lines

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature

notification support")

---
  drivers/scsi/ufs/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig index renamed from drivers/scsi/ufs/Kconfig +0 -0

565e8aa6319d..30c6edb53be9 100644

drivers/scsi/ufs/Kconfig +0 -0
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
Quoted 11 lines

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 208

Quoted 8 lines
drivers/scsi/ufs/Kconfig +1 -1
  config SCSI_UFS_HWMON
      bool "UFS  Temperature Notification"
-     depends on SCSI_UFSHCD && HWMON
+     depends on SCSI_UFSHCD && HWMON=y
      help
        This provides support for UFS hardware monitoring. If enabled,
        a hardware monitoring device will be created for the UFS device.

Thanks for fixing this.
Avri

Quoted 5 lines

Thanks.

--
~Randy

#3 lore raw
Quoted 16 lines · Avri Altman
Quoted 16 lines
Quoted 16 lines

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature

notification support")

---
   drivers/scsi/ufs/Kconfig | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig index renamed from drivers/scsi/ufs/Kconfig +0 -0

565e8aa6319d..30c6edb53be9 100644

drivers/scsi/ufs/Kconfig +0 -0
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
Quoted 7 lines
Quoted 7 lines

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 208

Quoted 7 lines
drivers/scsi/ufs/Kconfig +1 -1
   config SCSI_UFS_HWMON
       bool "UFS  Temperature Notification"
-     depends on SCSI_UFSHCD && HWMON
+     depends on SCSI_UFSHCD && HWMON=y
       help
         This provides support for UFS hardware monitoring. If enabled,
         a hardware monitoring device will be created for the UFS device.

Thinking about this, it should be possible to do it like this so that both SCSI_UFSHCD=m ad SCSI_HFS_HWMON=m would also work. I.e., this would allow more combinations of Kconfig settings to work. It only excludes SCSI_UFSH_HWMON=y and HWMON=m

+ depends on SCSI_UFSHCD=HWMON || HWMON=y

OK, I have verified that this works (builds) in all allowed combinations. Anders, would you please resubmit the patch?

Signature · 1 line
~Randy
#4 lore raw
Quoted 31 lines · Randy Dunlap
Quoted 16 lines · Avri Altman
Quoted 16 lines
Quoted 16 lines

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature

notification support")

---
   drivers/scsi/ufs/Kconfig | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig index renamed from drivers/scsi/ufs/Kconfig +0 -0

565e8aa6319d..30c6edb53be9 100644

drivers/scsi/ufs/Kconfig +0 -0
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
Quoted 7 lines
Quoted 7 lines

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 208

Quoted 7 lines
drivers/scsi/ufs/Kconfig +1 -1
   config SCSI_UFS_HWMON
       bool "UFS  Temperature Notification"
-     depends on SCSI_UFSHCD && HWMON
+     depends on SCSI_UFSHCD && HWMON=y
       help
         This provides support for UFS hardware monitoring. If enabled,
         a hardware monitoring device will be created for the UFS device.

Thinking about this, it should be possible to do it like this so that both SCSI_UFSHCD=m ad SCSI_HFS_HWMON=m would also work. I.e., this would allow more combinations of Kconfig settings to work. It only excludes SCSI_UFSH_HWMON=y and HWMON=m

Quoted 4 lines

+ depends on SCSI_UFSHCD=HWMON || HWMON=y

OK, I have verified that this works (builds) in all allowed combinations. Anders, would you please resubmit the patch?

Yeah, I'll send the patch.

Cheers,
Anders

#5 lore raw

PATCH v2 1/1 scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y

In reply to Avri Altman

When building an allmodconfig kernel, the following build error shows up:

aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_probe':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177: undefined reference to hwmon_device_register_with_info' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177:(.text+0x510): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_register_with_info'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_remove':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195: undefined reference to hwmon_device_unregister' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195:(.text+0x5c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_unregister'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_notify_event':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206:(.text+0x64c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'
aarch64-linux-gnu-ld: /home/anders/src/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209:(.text+0x66c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature notification support")
---
 drivers/scsi/ufs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig +1 -1
index 565e8aa6319d..2ca69f87e4de 100644
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
 config SCSI_UFS_HWMON
 	bool "UFS  Temperature Notification"
-	depends on SCSI_UFSHCD && HWMON
+	depends on SCSI_UFSHCD=HWMON || HWMON=y
 	help
 	  This provides support for UFS hardware monitoring. If enabled,
 	  a hardware monitoring device will be created for the UFS device.
Signature · 1 line
2.33.0
#6 lore raw

Anders,

Quoted 2 lines

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Applied to 5.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#7 lore raw
In reply to Anders Roxell
Quoted 15 lines · Anders Roxell

When building an allmodconfig kernel, the following build error shows up:

aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_probe':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177: undefined reference to hwmon_device_register_with_info' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177:(.text+0x510): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_register_with_info'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_remove':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195: undefined reference to hwmon_device_unregister' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195:(.text+0x5c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_unregister'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_notify_event':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206:(.text+0x64c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'
aarch64-linux-gnu-ld: /home/anders/src/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209:(.text+0x66c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'

Quoted 1 line

[...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y

      https://git.kernel.org/mkp/scsi/c/60c98a87fcaa
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#8 lore raw
In reply to Anders Roxell

Hi Anders,

Quoted 32 lines · Anders Roxell

When building an allmodconfig kernel, the following build error shows up:

aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_probe':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177: undefined reference to hwmon_device_register_with_info' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:177:(.text+0x510): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_register_with_info'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_remove':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195: undefined reference to hwmon_device_unregister' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:195:(.text+0x5c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_device_unregister'
aarch64-linux-gnu-ld: drivers/scsi/ufs/ufs-hwmon.o: in function `ufs_hwmon_notify_event':
/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:206:(.text+0x64c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'
aarch64-linux-gnu-ld: /home/anders/src/kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209: undefined reference to hwmon_notify_event' /kernel/next/drivers/scsi/ufs/ufs-hwmon.c:209:(.text+0x66c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol hwmon_notify_event'

Since fragment 'SCSI_UFS_HWMON' can't be build as a module, 'SCSI_UFS_HWMON' has to depend on 'HWMON=y'.

Fixes e88e2d32200a ("scsi: ufs: core: Probe for temperature notification support")
---
 drivers/scsi/ufs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/Kconfig +0 -0
index 565e8aa6319d..2ca69f87e4de 100644

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 205

Quoted 5 lines
drivers/scsi/ufs/Kconfig +1 -1
@@ -202,7 +202,7 @@ config SCSI_UFS_FAULT_INJECTION
 
 config SCSI_UFS_HWMON
        bool "UFS  Temperature Notification"
-       depends on SCSI_UFSHCD && HWMON
+       depends on SCSI_UFSHCD=HWMON || HWMON=y

Which is also true if both SCSI_UFSHCD and HWMON are disabled, thus exposing this question to everyone?

Fix sent
"[PATCH] scsi: ufs: Wrap Universal Flash Storage drivers in SCSI_UFSHCD"
https://lore.kernel.org/all/[email protected]/

drivers/scsi/ufs/Kconfig config SCSI_UFS_FAULT_INJECTION · line 208

Quoted 3 lines
drivers/scsi/ufs/Kconfig +0 -0
        help
          This provides support for UFS hardware monitoring. If enabled,
          a hardware monitoring device will be created for the UFS device.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds