[PATCH] powerpc/ps3: Mark ps3_setup_uhc_device() __init

Geert Uytterhoeven posted 1 patch 2 weeks, 3 days ago
arch/powerpc/platforms/ps3/device-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] powerpc/ps3: Mark ps3_setup_uhc_device() __init
Posted by Geert Uytterhoeven 2 weeks, 3 days ago
ps3_setup_uhc_device() is only called from ps3_setup_ehci_device() and
ps3_setup_ohci_device(), which are both marked __init.  Hence replace
the former's __ref marker by __init.

Note that before commit bd721ea73e1f9655 ("treewide: replace obsolete
_refok by __ref"), the function was marked __init_refok, which probably
should have been __init in the first place.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/powerpc/platforms/ps3/device-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index b18e1c92e554ce87..61722133eb2d3f99 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -178,7 +178,7 @@ static int __init ps3_setup_gelic_device(
 	return result;
 }
 
-static int __ref ps3_setup_uhc_device(
+static int __init ps3_setup_uhc_device(
 	const struct ps3_repository_device *repo, enum ps3_match_id match_id,
 	enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type)
 {
-- 
2.34.1
Re: [PATCH] powerpc/ps3: Mark ps3_setup_uhc_device() __init
Posted by Michael Ellerman 6 days, 17 hours ago
On Wed, 06 Nov 2024 14:26:25 +0100, Geert Uytterhoeven wrote:
> ps3_setup_uhc_device() is only called from ps3_setup_ehci_device() and
> ps3_setup_ohci_device(), which are both marked __init.  Hence replace
> the former's __ref marker by __init.
> 
> Note that before commit bd721ea73e1f9655 ("treewide: replace obsolete
> _refok by __ref"), the function was marked __init_refok, which probably
> should have been __init in the first place.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/ps3: Mark ps3_setup_uhc_device() __init
      https://git.kernel.org/powerpc/c/da6ffe855b5a05f29222e3d4ffa4b549413e33a4

cheers
Re: [PATCH] powerpc/ps3: Mark ps3_setup_uhc_device() __init
Posted by Geoff Levand 2 weeks ago
Hi Geert,

On 11/6/24 22:26, Geert Uytterhoeven wrote:
> ps3_setup_uhc_device() is only called from ps3_setup_ehci_device() and
> ps3_setup_ohci_device(), which are both marked __init.  Hence replace
> the former's __ref marker by __init.
> 
> Note that before commit bd721ea73e1f9655 ("treewide: replace obsolete
> _refok by __ref"), the function was marked __init_refok, which probably
> should have been __init in the first place.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/powerpc/platforms/ps3/device-init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
> index b18e1c92e554ce87..61722133eb2d3f99 100644
> --- a/arch/powerpc/platforms/ps3/device-init.c
> +++ b/arch/powerpc/platforms/ps3/device-init.c
> @@ -178,7 +178,7 @@ static int __init ps3_setup_gelic_device(
>  	return result;
>  }
>  
> -static int __ref ps3_setup_uhc_device(
> +static int __init ps3_setup_uhc_device(
>  	const struct ps3_repository_device *repo, enum ps3_match_id match_id,
>  	enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type)
>  {

I tested this on PS3 and it seems to work OK.
Acked-by: Geoff Levand <geoff@infradead.org>