diff mbox series

[3/3] powerpc/platforms/83xx/suspend: Remove write-only global variable

Message ID 20220707061441.193869-3-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted
Headers show
Series [1/3] powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 10 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 7 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Uwe Kleine-König July 7, 2022, 6:14 a.m. UTC
pmc_dev is only assigned in .probe(), otherwise the variable is unused.
So drop this pointer that serves no purpose.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/powerpc/platforms/83xx/suspend.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Christophe Leroy July 7, 2022, 8:49 a.m. UTC | #1
Le 07/07/2022 à 08:14, Uwe Kleine-König a écrit :
> pmc_dev is only assigned in .probe(), otherwise the variable is unused.
> So drop this pointer that serves no purpose.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   arch/powerpc/platforms/83xx/suspend.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
> index 309f42ab63d4..3fa8979ac8a6 100644
> --- a/arch/powerpc/platforms/83xx/suspend.c
> +++ b/arch/powerpc/platforms/83xx/suspend.c
> @@ -100,7 +100,6 @@ struct pmc_type {
>   	int has_deep_sleep;
>   };
>   
> -static struct platform_device *pmc_dev;
>   static int has_deep_sleep, deep_sleeping;
>   static int pmc_irq;
>   static struct mpc83xx_pmc __iomem *pmc_regs;
> @@ -356,7 +355,6 @@ static int pmc_probe(struct platform_device *ofdev)
>   
>   	has_deep_sleep = type->has_deep_sleep;
>   	immrbase = get_immrbase();
> -	pmc_dev = ofdev;
>   
>   	is_pci_agent = mpc83xx_is_pci_agent();
>   	if (is_pci_agent < 0)
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 309f42ab63d4..3fa8979ac8a6 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -100,7 +100,6 @@  struct pmc_type {
 	int has_deep_sleep;
 };
 
-static struct platform_device *pmc_dev;
 static int has_deep_sleep, deep_sleeping;
 static int pmc_irq;
 static struct mpc83xx_pmc __iomem *pmc_regs;
@@ -356,7 +355,6 @@  static int pmc_probe(struct platform_device *ofdev)
 
 	has_deep_sleep = type->has_deep_sleep;
 	immrbase = get_immrbase();
-	pmc_dev = ofdev;
 
 	is_pci_agent = mpc83xx_is_pci_agent();
 	if (is_pci_agent < 0)