patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status()
@ 2023-11-20 22:35 Nathan Chancellor
  2023-11-21  7:09 ` Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-11-20 22:35 UTC (permalink / raw)
  To: sre
  Cc: nicolas.ferre, alexandre.belloni, claudiu.beznea, u.kleine-koenig,
	linux-pm, linux-arm-kernel, llvm, patches, Nathan Chancellor

When building with clang, there are two section mismatch warnings:

  WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text)
  WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text)

Drop '__init' from at91_wakeup_status() to clear up the mismatch.

Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()")
Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I suspect this is not visible for GCC due to inlining
at91_wakeup_status() but I did not actually check.
---
 drivers/power/reset/at91-poweroff.c      | 2 +-
 drivers/power/reset/at91-sama5d2_shdwc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
index 126e774e210c..93eece027865 100644
--- a/drivers/power/reset/at91-poweroff.c
+++ b/drivers/power/reset/at91-poweroff.c
@@ -57,7 +57,7 @@ static struct shdwc {
 	void __iomem *mpddrc_base;
 } at91_shdwc;
 
-static void __init at91_wakeup_status(struct platform_device *pdev)
+static void at91_wakeup_status(struct platform_device *pdev)
 {
 	const char *reason;
 	u32 reg = readl(at91_shdwc.shdwc_base + AT91_SHDW_SR);
diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
index af95c7b39cb3..959ce0dbe91d 100644
--- a/drivers/power/reset/at91-sama5d2_shdwc.c
+++ b/drivers/power/reset/at91-sama5d2_shdwc.c
@@ -107,7 +107,7 @@ static const unsigned long long sdwc_dbc_period[] = {
 	0, 3, 32, 512, 4096, 32768,
 };
 
-static void __init at91_wakeup_status(struct platform_device *pdev)
+static void at91_wakeup_status(struct platform_device *pdev)
 {
 	struct shdwc *shdw = platform_get_drvdata(pdev);
 	const struct reg_config *rcfg = shdw->rcfg;

---
base-commit: b55d073e6501dc6077edaa945a6dad8ac5c8bbab
change-id: 20231120-fix-at91-modpost-warnings-beabd2bac722

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


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

* Re: [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status()
  2023-11-20 22:35 [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status() Nathan Chancellor
@ 2023-11-21  7:09 ` Uwe Kleine-König
  2023-12-05 17:49 ` Nathan Chancellor
  2023-12-06  9:24 ` Nicolas Ferre
  2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2023-11-21  7:09 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: sre, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux-pm,
	linux-arm-kernel, llvm, patches

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

On Mon, Nov 20, 2023 at 03:35:32PM -0700, Nathan Chancellor wrote:
> When building with clang, there are two section mismatch warnings:
> 
>   WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text)
>   WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text)
> 
> Drop '__init' from at91_wakeup_status() to clear up the mismatch.
> 
> Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()")
> Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Thanks.

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status()
  2023-11-20 22:35 [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status() Nathan Chancellor
  2023-11-21  7:09 ` Uwe Kleine-König
@ 2023-12-05 17:49 ` Nathan Chancellor
  2023-12-06  9:24 ` Nicolas Ferre
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-12-05 17:49 UTC (permalink / raw)
  To: sre
  Cc: nicolas.ferre, alexandre.belloni, claudiu.beznea, u.kleine-koenig,
	linux-pm, linux-arm-kernel, llvm, patches

Ping? I still see these warnings in next-20231205.

On Mon, Nov 20, 2023 at 03:35:32PM -0700, Nathan Chancellor wrote:
> When building with clang, there are two section mismatch warnings:
> 
>   WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text)
>   WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text)
> 
> Drop '__init' from at91_wakeup_status() to clear up the mismatch.
> 
> Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()")
> Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> I suspect this is not visible for GCC due to inlining
> at91_wakeup_status() but I did not actually check.
> ---
>  drivers/power/reset/at91-poweroff.c      | 2 +-
>  drivers/power/reset/at91-sama5d2_shdwc.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
> index 126e774e210c..93eece027865 100644
> --- a/drivers/power/reset/at91-poweroff.c
> +++ b/drivers/power/reset/at91-poweroff.c
> @@ -57,7 +57,7 @@ static struct shdwc {
>  	void __iomem *mpddrc_base;
>  } at91_shdwc;
>  
> -static void __init at91_wakeup_status(struct platform_device *pdev)
> +static void at91_wakeup_status(struct platform_device *pdev)
>  {
>  	const char *reason;
>  	u32 reg = readl(at91_shdwc.shdwc_base + AT91_SHDW_SR);
> diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
> index af95c7b39cb3..959ce0dbe91d 100644
> --- a/drivers/power/reset/at91-sama5d2_shdwc.c
> +++ b/drivers/power/reset/at91-sama5d2_shdwc.c
> @@ -107,7 +107,7 @@ static const unsigned long long sdwc_dbc_period[] = {
>  	0, 3, 32, 512, 4096, 32768,
>  };
>  
> -static void __init at91_wakeup_status(struct platform_device *pdev)
> +static void at91_wakeup_status(struct platform_device *pdev)
>  {
>  	struct shdwc *shdw = platform_get_drvdata(pdev);
>  	const struct reg_config *rcfg = shdw->rcfg;
> 
> ---
> base-commit: b55d073e6501dc6077edaa945a6dad8ac5c8bbab
> change-id: 20231120-fix-at91-modpost-warnings-beabd2bac722
> 
> Best regards,
> -- 
> Nathan Chancellor <nathan@kernel.org>
> 

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

* Re: [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status()
  2023-11-20 22:35 [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status() Nathan Chancellor
  2023-11-21  7:09 ` Uwe Kleine-König
  2023-12-05 17:49 ` Nathan Chancellor
@ 2023-12-06  9:24 ` Nicolas Ferre
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2023-12-06  9:24 UTC (permalink / raw)
  To: Nathan Chancellor, sre
  Cc: alexandre.belloni, claudiu.beznea, u.kleine-koenig, linux-pm,
	linux-arm-kernel, llvm, patches

On 20/11/2023 at 23:35, Nathan Chancellor wrote:
> When building with clang, there are two section mismatch warnings:
> 
>    WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text)
>    WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text)
> 
> Drop '__init' from at91_wakeup_status() to clear up the mismatch.
> 
> Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()")
> Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks, best regards,
   Nicolas

> ---
> I suspect this is not visible for GCC due to inlining
> at91_wakeup_status() but I did not actually check.
> ---
>   drivers/power/reset/at91-poweroff.c      | 2 +-
>   drivers/power/reset/at91-sama5d2_shdwc.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
> index 126e774e210c..93eece027865 100644
> --- a/drivers/power/reset/at91-poweroff.c
> +++ b/drivers/power/reset/at91-poweroff.c
> @@ -57,7 +57,7 @@ static struct shdwc {
>          void __iomem *mpddrc_base;
>   } at91_shdwc;
> 
> -static void __init at91_wakeup_status(struct platform_device *pdev)
> +static void at91_wakeup_status(struct platform_device *pdev)
>   {
>          const char *reason;
>          u32 reg = readl(at91_shdwc.shdwc_base + AT91_SHDW_SR);
> diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
> index af95c7b39cb3..959ce0dbe91d 100644
> --- a/drivers/power/reset/at91-sama5d2_shdwc.c
> +++ b/drivers/power/reset/at91-sama5d2_shdwc.c
> @@ -107,7 +107,7 @@ static const unsigned long long sdwc_dbc_period[] = {
>          0, 3, 32, 512, 4096, 32768,
>   };
> 
> -static void __init at91_wakeup_status(struct platform_device *pdev)
> +static void at91_wakeup_status(struct platform_device *pdev)
>   {
>          struct shdwc *shdw = platform_get_drvdata(pdev);
>          const struct reg_config *rcfg = shdw->rcfg;
> 
> ---
> base-commit: b55d073e6501dc6077edaa945a6dad8ac5c8bbab
> change-id: 20231120-fix-at91-modpost-warnings-beabd2bac722
> 
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
> 


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

end of thread, other threads:[~2023-12-06  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 22:35 [PATCH] power: reset: at91: Drop '__init' from at91_wakeup_status() Nathan Chancellor
2023-11-21  7:09 ` Uwe Kleine-König
2023-12-05 17:49 ` Nathan Chancellor
2023-12-06  9:24 ` Nicolas Ferre

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).