linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal
@ 2022-03-11 14:52 Lukas Bulwahn
  2022-03-14  8:49 ` Lee Jones
  2022-03-14 22:30 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Lukas Bulwahn @ 2022-03-11 14:52 UTC (permalink / raw)
  To: Linus Walleij, Lee Jones, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel, Lukas Bulwahn

Commit 3d4d1266597c ("mfd: ab8500: Drop debugfs module") removes the config
AB8500_DEBUG in drivers/mfd/Kconfig, but missed a reference to this config
in include/linux/mfd/abx500/ab8500.h.

The functions ab8500_dump_all_banks() and ab8500_debug_register_interrupt()
in the ab8500 header, previously with definitions conditioned on
AB8500_DEBUG, are now completely needless to define and handle at all.

The function ab8500_debug_register_interrupt() is not used at all and can
just be removed.

The function ab8500_dump_all_banks() is just registered in the abx500_ops
struct in the dump_all_banks field, but this is then not further referenced
anywhere else at all. So, safely drop the dump_all_banks field from
abx500_ops and delete the ab8500_dump_all_banks() definition.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
Linus, Lee, please pick this clean-up on top of the commit above.

 drivers/mfd/ab8500-core.c         | 3 +--
 include/linux/mfd/abx500.h        | 1 -
 include/linux/mfd/abx500/ab8500.h | 9 ---------
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 6a059270acdc..9049030a0c82 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -328,8 +328,7 @@ static struct abx500_ops ab8500_ops = {
 	.set_register_page = NULL,
 	.mask_and_set_register = ab8500_mask_and_set_register,
 	.event_registers_startup_state_get = NULL,
-	.startup_irq_enabled = NULL,
-	.dump_all_banks = ab8500_dump_all_banks,
+	.startup_irq_enabled = NULL
 };
 
 static void ab8500_irq_lock(struct irq_data *data)
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index 7f07cfe44753..507e3d2f062f 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -63,7 +63,6 @@ struct abx500_ops {
 	int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
 	int (*event_registers_startup_state_get) (struct device *, u8 *);
 	int (*startup_irq_enabled) (struct device *, unsigned int);
-	void (*dump_all_banks) (struct device *);
 };
 
 int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 302a330c5c84..42fd5da7d8a7 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -503,13 +503,4 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
 
 void ab8500_override_turn_on_stat(u8 mask, u8 set);
 
-#ifdef CONFIG_AB8500_DEBUG
-extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
-void ab8500_dump_all_banks(struct device *dev);
-void ab8500_debug_register_interrupt(int line);
-#else
-static inline void ab8500_dump_all_banks(struct device *dev) {}
-static inline void ab8500_debug_register_interrupt(int line) {}
-#endif
-
 #endif /* MFD_AB8500_H */
-- 
2.17.1


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

* Re: [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal
  2022-03-11 14:52 [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal Lukas Bulwahn
@ 2022-03-14  8:49 ` Lee Jones
  2022-03-14 22:30 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2022-03-14  8:49 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Linus Walleij, linux-arm-kernel, kernel-janitors, linux-kernel

On Fri, 11 Mar 2022, Lukas Bulwahn wrote:

> Commit 3d4d1266597c ("mfd: ab8500: Drop debugfs module") removes the config
> AB8500_DEBUG in drivers/mfd/Kconfig, but missed a reference to this config
> in include/linux/mfd/abx500/ab8500.h.
> 
> The functions ab8500_dump_all_banks() and ab8500_debug_register_interrupt()
> in the ab8500 header, previously with definitions conditioned on
> AB8500_DEBUG, are now completely needless to define and handle at all.
> 
> The function ab8500_debug_register_interrupt() is not used at all and can
> just be removed.
> 
> The function ab8500_dump_all_banks() is just registered in the abx500_ops
> struct in the dump_all_banks field, but this is then not further referenced
> anywhere else at all. So, safely drop the dump_all_banks field from
> abx500_ops and delete the ab8500_dump_all_banks() definition.
> 
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
> Linus, Lee, please pick this clean-up on top of the commit above.
> 
>  drivers/mfd/ab8500-core.c         | 3 +--
>  include/linux/mfd/abx500.h        | 1 -
>  include/linux/mfd/abx500/ab8500.h | 9 ---------
>  3 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
> index 6a059270acdc..9049030a0c82 100644
> --- a/drivers/mfd/ab8500-core.c
> +++ b/drivers/mfd/ab8500-core.c
> @@ -328,8 +328,7 @@ static struct abx500_ops ab8500_ops = {
>  	.set_register_page = NULL,
>  	.mask_and_set_register = ab8500_mask_and_set_register,
>  	.event_registers_startup_state_get = NULL,
> -	.startup_irq_enabled = NULL,
> -	.dump_all_banks = ab8500_dump_all_banks,
> +	.startup_irq_enabled = NULL

Leave the ',' in please.  It will save on churn.


>  };
>  
>  static void ab8500_irq_lock(struct irq_data *data)
> diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
> index 7f07cfe44753..507e3d2f062f 100644
> --- a/include/linux/mfd/abx500.h
> +++ b/include/linux/mfd/abx500.h
> @@ -63,7 +63,6 @@ struct abx500_ops {
>  	int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
>  	int (*event_registers_startup_state_get) (struct device *, u8 *);
>  	int (*startup_irq_enabled) (struct device *, unsigned int);
> -	void (*dump_all_banks) (struct device *);
>  };
>  
>  int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
> diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
> index 302a330c5c84..42fd5da7d8a7 100644
> --- a/include/linux/mfd/abx500/ab8500.h
> +++ b/include/linux/mfd/abx500/ab8500.h
> @@ -503,13 +503,4 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
>  
>  void ab8500_override_turn_on_stat(u8 mask, u8 set);
>  
> -#ifdef CONFIG_AB8500_DEBUG
> -extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> -void ab8500_dump_all_banks(struct device *dev);
> -void ab8500_debug_register_interrupt(int line);
> -#else
> -static inline void ab8500_dump_all_banks(struct device *dev) {}
> -static inline void ab8500_debug_register_interrupt(int line) {}
> -#endif
> -
>  #endif /* MFD_AB8500_H */

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal
  2022-03-11 14:52 [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal Lukas Bulwahn
  2022-03-14  8:49 ` Lee Jones
@ 2022-03-14 22:30 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-03-14 22:30 UTC (permalink / raw)
  To: Lukas Bulwahn; +Cc: Lee Jones, linux-arm-kernel, kernel-janitors, linux-kernel

On Fri, Mar 11, 2022 at 3:52 PM Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:

> Commit 3d4d1266597c ("mfd: ab8500: Drop debugfs module") removes the config
> AB8500_DEBUG in drivers/mfd/Kconfig, but missed a reference to this config
> in include/linux/mfd/abx500/ab8500.h.
>
> The functions ab8500_dump_all_banks() and ab8500_debug_register_interrupt()
> in the ab8500 header, previously with definitions conditioned on
> AB8500_DEBUG, are now completely needless to define and handle at all.
>
> The function ab8500_debug_register_interrupt() is not used at all and can
> just be removed.
>
> The function ab8500_dump_all_banks() is just registered in the abx500_ops
> struct in the dump_all_banks field, but this is then not further referenced
> anywhere else at all. So, safely drop the dump_all_banks field from
> abx500_ops and delete the ab8500_dump_all_banks() definition.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
> Linus, Lee, please pick this clean-up on top of the commit above.

With Lee's requested one-character fix:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-03-14 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 14:52 [PATCH] mfd: ab8500: clean up definitions in header after debugfs removal Lukas Bulwahn
2022-03-14  8:49 ` Lee Jones
2022-03-14 22:30 ` Linus Walleij

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