linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: sm750fb: Remove unused enum dpms
@ 2025-03-14 17:31 Gabriel Lima Luz
  2025-03-20 14:12 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Lima Luz @ 2025-03-14 17:31 UTC (permalink / raw)
  To: linux-fbdev, linux-staging, linux-kernel, Sudip Mukherjee,
	Teddy Wang, Greg Kroah-Hartman, ~lkcamp/patches

remove unused enum and replace its usage with
a unsigned int.
add comment to ddk750_set_dpms function for
documenting state values

Signed-off-by: Gabriel Lima Luz <lima.gabriel.luz@gmail.com>
---
 drivers/staging/sm750fb/ddk750_power.c | 10 ++++++++--
 drivers/staging/sm750fb/ddk750_power.h |  9 +--------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
index 12834f78eef7..547a96ccba9b 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -3,8 +3,14 @@
 #include "ddk750_reg.h"
 #include "ddk750_power.h"
 
-void ddk750_set_dpms(enum dpms state)
-{
+void ddk750_set_dpms(unsigned int state)
+{	/*
+	 *	state values documentation
+	 *	crt_DPMS_ON = 0x0,
+	 *	crt_DPMS_STANDBY = 0x1,
+	 *	crt_DPMS_SUSPEND = 0x2,
+	 *	crt_DPMS_OFF = 0x3,	unsigned int value;
+	 */
 	unsigned int value;
 
 	if (sm750_get_chip_type() == SM750LE) {
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 63c9e8b6ffb3..93dafdde3699 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -2,19 +2,12 @@
 #ifndef DDK750_POWER_H__
 #define DDK750_POWER_H__
 
-enum dpms {
-	crtDPMS_ON = 0x0,
-	crtDPMS_STANDBY = 0x1,
-	crtDPMS_SUSPEND = 0x2,
-	crtDPMS_OFF = 0x3,
-};
-
 #define set_DAC(off) {							\
 	poke32(MISC_CTRL,						\
 	       (peek32(MISC_CTRL) & ~MISC_CTRL_DAC_POWER_OFF) | (off)); \
 }
 
-void ddk750_set_dpms(enum dpms state);
+void ddk750_set_dpms(unsigned int state);
 void sm750_set_power_mode(unsigned int mode);
 void sm750_set_current_gate(unsigned int gate);
 
-- 
2.43.0


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

* Re: [PATCH v2] staging: sm750fb: Remove unused enum dpms
  2025-03-14 17:31 [PATCH v2] staging: sm750fb: Remove unused enum dpms Gabriel Lima Luz
@ 2025-03-20 14:12 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-03-20 14:12 UTC (permalink / raw)
  To: Gabriel Lima Luz
  Cc: linux-fbdev, linux-staging, linux-kernel, Sudip Mukherjee,
	Teddy Wang, ~lkcamp/patches

On Fri, Mar 14, 2025 at 02:31:09PM -0300, Gabriel Lima Luz wrote:
> remove unused enum and replace its usage with
> a unsigned int.
> add comment to ddk750_set_dpms function for
> documenting state values
> 
> Signed-off-by: Gabriel Lima Luz <lima.gabriel.luz@gmail.com>
> ---
>  drivers/staging/sm750fb/ddk750_power.c | 10 ++++++++--
>  drivers/staging/sm750fb/ddk750_power.h |  9 +--------
>  2 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
> index 12834f78eef7..547a96ccba9b 100644
> --- a/drivers/staging/sm750fb/ddk750_power.c
> +++ b/drivers/staging/sm750fb/ddk750_power.c
> @@ -3,8 +3,14 @@
>  #include "ddk750_reg.h"
>  #include "ddk750_power.h"
>  
> -void ddk750_set_dpms(enum dpms state)
> -{
> +void ddk750_set_dpms(unsigned int state)
> +{	/*
> +	 *	state values documentation
> +	 *	crt_DPMS_ON = 0x0,
> +	 *	crt_DPMS_STANDBY = 0x1,
> +	 *	crt_DPMS_SUSPEND = 0x2,
> +	 *	crt_DPMS_OFF = 0x3,	unsigned int value;
> +	 */
>  	unsigned int value;

Why not just make this "enum dpms" instead?

thanks,

greg k-h

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

end of thread, other threads:[~2025-03-20 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 17:31 [PATCH v2] staging: sm750fb: Remove unused enum dpms Gabriel Lima Luz
2025-03-20 14:12 ` Greg Kroah-Hartman

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