linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
@ 2021-09-24 16:45 Anders Roxell
  2021-09-24 17:07 ` Randy Dunlap
  0 siblings, 1 reply; 9+ messages in thread
From: Anders Roxell @ 2021-09-24 16:45 UTC (permalink / raw)
  To: jejb, martin.petersen, jdelvare, linux
  Cc: avri.altman, linux-scsi, linux-kernel, linux-hwmon, 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")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/scsi/ufs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
index 565e8aa6319d..30c6edb53be9 100644
--- a/drivers/scsi/ufs/Kconfig
+++ b/drivers/scsi/ufs/Kconfig
@@ -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.
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-24 16:45 [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y Anders Roxell
@ 2021-09-24 17:07 ` Randy Dunlap
  2021-09-24 18:59   ` Avri Altman
  0 siblings, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2021-09-24 17:07 UTC (permalink / raw)
  To: Anders Roxell, jejb, martin.petersen, jdelvare, linux
  Cc: avri.altman, linux-scsi, linux-kernel, linux-hwmon

On 9/24/21 9:45 AM, Anders Roxell wrote:
> 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")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>   drivers/scsi/ufs/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
> index 565e8aa6319d..30c6edb53be9 100644
> --- a/drivers/scsi/ufs/Kconfig
> +++ b/drivers/scsi/ufs/Kconfig
> @@ -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.
> 

Also-Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

-- 
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-24 17:07 ` Randy Dunlap
@ 2021-09-24 18:59   ` Avri Altman
  2021-09-24 19:53     ` Randy Dunlap
  2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
  0 siblings, 2 replies; 9+ messages in thread
From: Avri Altman @ 2021-09-24 18:59 UTC (permalink / raw)
  To: Randy Dunlap, Anders Roxell, jejb, martin.petersen, jdelvare, linux
  Cc: linux-scsi, linux-kernel, linux-hwmon

> > 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")
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > ---
> >   drivers/scsi/ufs/Kconfig | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index
> > 565e8aa6319d..30c6edb53be9 100644
> > --- a/drivers/scsi/ufs/Kconfig
> > +++ b/drivers/scsi/ufs/Kconfig
> > @@ -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.
> >
> 
> Also-Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Acked-by: Avri Altman <avri.altman@wdc.com>

Thanks for fixing this.
Avri

> 
> Thanks.
> 
> --
> ~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-24 18:59   ` Avri Altman
@ 2021-09-24 19:53     ` Randy Dunlap
  2021-09-27  8:45       ` Anders Roxell
  2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
  1 sibling, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2021-09-24 19:53 UTC (permalink / raw)
  To: Avri Altman, Anders Roxell, jejb, martin.petersen, jdelvare, linux
  Cc: linux-scsi, linux-kernel, linux-hwmon

On 9/24/21 11:59 AM, Avri Altman wrote:
>>> 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")
>>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>>> ---
>>>    drivers/scsi/ufs/Kconfig | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index
>>> 565e8aa6319d..30c6edb53be9 100644
>>> --- a/drivers/scsi/ufs/Kconfig
>>> +++ b/drivers/scsi/ufs/Kconfig
>>> @@ -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.

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?


-- 
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-24 19:53     ` Randy Dunlap
@ 2021-09-27  8:45       ` Anders Roxell
  0 siblings, 0 replies; 9+ messages in thread
From: Anders Roxell @ 2021-09-27  8:45 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Avri Altman, jejb, martin.petersen, jdelvare, linux, linux-scsi,
	linux-kernel, linux-hwmon

On Fri, 24 Sept 2021 at 21:53, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 9/24/21 11:59 AM, Avri Altman wrote:
> >>> 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")
> >>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> >>> ---
> >>>    drivers/scsi/ufs/Kconfig | 2 +-
> >>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index
> >>> 565e8aa6319d..30c6edb53be9 100644
> >>> --- a/drivers/scsi/ufs/Kconfig
> >>> +++ b/drivers/scsi/ufs/Kconfig
> >>> @@ -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.
>
> 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?

Yeah, I'll send the patch.

Cheers,
Anders

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCHv2] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-24 18:59   ` Avri Altman
  2021-09-24 19:53     ` Randy Dunlap
@ 2021-09-27  8:46     ` Anders Roxell
  2021-09-29  3:24       ` Martin K. Petersen
                         ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Anders Roxell @ 2021-09-27  8:46 UTC (permalink / raw)
  To: jejb, martin.petersen, jdelvare, linux
  Cc: avri.altman, linux-scsi, linux-kernel, linux-hwmon,
	Anders Roxell, Randy Dunlap

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")
Also-Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Acked-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/scsi/ufs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
index 565e8aa6319d..2ca69f87e4de 100644
--- a/drivers/scsi/ufs/Kconfig
+++ b/drivers/scsi/ufs/Kconfig
@@ -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.
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCHv2] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
@ 2021-09-29  3:24       ` Martin K. Petersen
  2021-10-05  4:34       ` Martin K. Petersen
  2021-11-06 16:51       ` Geert Uytterhoeven
  2 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2021-09-29  3:24 UTC (permalink / raw)
  To: Anders Roxell
  Cc: jejb, martin.petersen, jdelvare, linux, avri.altman, linux-scsi,
	linux-kernel, linux-hwmon, Randy Dunlap


Anders,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv2] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
  2021-09-29  3:24       ` Martin K. Petersen
@ 2021-10-05  4:34       ` Martin K. Petersen
  2021-11-06 16:51       ` Geert Uytterhoeven
  2 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2021-10-05  4:34 UTC (permalink / raw)
  To: Anders Roxell, jdelvare, linux, jejb
  Cc: Martin K . Petersen, Randy Dunlap, linux-scsi, linux-hwmon,
	avri.altman, linux-kernel

On Mon, 27 Sep 2021 10:46:15 +0200, Anders Roxell wrote:

> 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'
> 
> [...]

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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv2] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y
  2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
  2021-09-29  3:24       ` Martin K. Petersen
  2021-10-05  4:34       ` Martin K. Petersen
@ 2021-11-06 16:51       ` Geert Uytterhoeven
  2 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2021-11-06 16:51 UTC (permalink / raw)
  To: Anders Roxell
  Cc: James E.J. Bottomley, Martin K. Petersen, Jean Delvare,
	Guenter Roeck, avri.altman, scsi, Linux Kernel Mailing List,
	linux-hwmon, Randy Dunlap

Hi Anders,

On Mon, Sep 27, 2021 at 10:47 AM Anders Roxell <anders.roxell@linaro.org> wrote:
> 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")
> Also-Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> Acked-by: Avri Altman <avri.altman@wdc.com>
> ---
>  drivers/scsi/ufs/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
> index 565e8aa6319d..2ca69f87e4de 100644
> --- a/drivers/scsi/ufs/Kconfig
> +++ b/drivers/scsi/ufs/Kconfig
> @@ -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/20211106164650.1571068-1-geert@linux-m68k.org/

>         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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-06 16:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 16:45 [PATCH] scsi: ufs: Kconfig: SCSI_UFS_HWMON depens on HWMON=y Anders Roxell
2021-09-24 17:07 ` Randy Dunlap
2021-09-24 18:59   ` Avri Altman
2021-09-24 19:53     ` Randy Dunlap
2021-09-27  8:45       ` Anders Roxell
2021-09-27  8:46     ` [PATCHv2] " Anders Roxell
2021-09-29  3:24       ` Martin K. Petersen
2021-10-05  4:34       ` Martin K. Petersen
2021-11-06 16:51       ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).