The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include
@ 2026-05-12  6:34 Chhabilal Dangal
  2026-05-12  6:34 ` [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include Chhabilal Dangal
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chhabilal Dangal @ 2026-05-12  6:34 UTC (permalink / raw)
  To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, Chhabilal Dangal

sm750_hw.c includes <asm/mtrr.h> under CONFIG_MTRR, but no
mtrr_add/mtrr_del calls exist in the file; the driver uses
arch_phys_wc_add/arch_phys_wc_del in sm750.c instead.

Remove the dead include.

Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
---
 drivers/staging/sm750fb/sm750_hw.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index a2798d428663..f491d3aca468 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -13,10 +13,6 @@
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/console.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
-#include <linux/platform_device.h>
 #include <linux/sizes.h>
 
 #include "sm750.h"
-- 
2.54.0


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

* [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include
  2026-05-12  6:34 [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Chhabilal Dangal
@ 2026-05-12  6:34 ` Chhabilal Dangal
  2026-05-12  7:20   ` Ahmet Sezgin Duran
  2026-05-12  6:34 ` [PATCH v3 3/3] staging: sm750fb: remove unused functions Chhabilal Dangal
  2026-05-12  7:36 ` [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Greg Kroah-Hartman
  2 siblings, 1 reply; 5+ messages in thread
From: Chhabilal Dangal @ 2026-05-12  6:34 UTC (permalink / raw)
  To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, Chhabilal Dangal

sm750_accel.c and sm750_cursor.c include <linux/platform_device.h>
but never call any platform device APIs. This is a PCI driver.

Remove the dead includes.

Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.c  |  1 -
 drivers/staging/sm750fb/sm750_cursor.c | 44 --------------------------
 2 files changed, 45 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 0f94d859e91c..0100fec6533b 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -13,7 +13,6 @@
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/console.h>
-#include <linux/platform_device.h>
 
 #include "sm750.h"
 #include "sm750_accel.h"
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index 7ede144905c9..552fd30e0d38 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -13,7 +13,6 @@
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/console.h>
-#include <linux/platform_device.h>
 
 #include "sm750.h"
 #include "sm750_cursor.h"
@@ -130,46 +129,3 @@ void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
 		}
 	}
 }
-
-void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
-			       const u8 *pcol, const u8 *pmsk)
-{
-	int i, j, count, pitch, offset;
-	u8 color, mask;
-	u16 data;
-	void __iomem *pbuffer, *pstart;
-
-	/*  in byte*/
-	pitch = cursor->w >> 3;
-
-	/* in byte	*/
-	count = pitch * cursor->h;
-
-	/* in byte */
-	offset = cursor->max_w * 2 / 8;
-
-	data = 0;
-	pstart = cursor->vstart;
-	pbuffer = pstart;
-
-	for (i = 0; i < count; i++) {
-		color = *pcol++;
-		mask = *pmsk++;
-		data = 0;
-
-		for (j = 0; j < 8; j++) {
-			if (mask & (1 << j))
-				data |= ((color & (1 << j)) ? 1 : 2) << (j * 2);
-		}
-		iowrite16(data, pbuffer);
-
-		/* assume pitch is 1,2,4,8,...*/
-		if (!(i & (pitch - 1))) {
-			/* need a return */
-			pstart += offset;
-			pbuffer = pstart;
-		} else {
-			pbuffer += sizeof(u16);
-		}
-	}
-}
-- 
2.54.0


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

* [PATCH v3 3/3] staging: sm750fb: remove unused functions
  2026-05-12  6:34 [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Chhabilal Dangal
  2026-05-12  6:34 ` [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include Chhabilal Dangal
@ 2026-05-12  6:34 ` Chhabilal Dangal
  2026-05-12  7:36 ` [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Chhabilal Dangal @ 2026-05-12  6:34 UTC (permalink / raw)
  To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, Chhabilal Dangal

sm750_hw_cursor_set_data2() in sm750_cursor.c and sm750_enable_i2c()
in ddk750_power.c are defined and declared but never called.

Remove both dead functions and their declarations.

Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
---
 drivers/staging/sm750fb/ddk750_power.c | 16 ----------------
 drivers/staging/sm750fb/ddk750_power.h |  5 -----
 drivers/staging/sm750fb/sm750_cursor.h |  2 --
 3 files changed, 23 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
index 12834f78eef7..1f7e0ec1d02b 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -127,19 +127,3 @@ void sm750_enable_gpio(unsigned int enable)
 	sm750_set_current_gate(gate);
 }
 
-/*
- * This function enable/disable the I2C Engine
- */
-void sm750_enable_i2c(unsigned int enable)
-{
-	u32 gate;
-
-	/* Enable I2C Gate */
-	gate = peek32(CURRENT_GATE);
-	if (enable)
-		gate |= CURRENT_GATE_I2C;
-	else
-		gate &= ~CURRENT_GATE_I2C;
-
-	sm750_set_current_gate(gate);
-}
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 5cbb11986bb8..1c4f054d7276 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -33,9 +33,4 @@ void sm750_enable_dma(unsigned int enable);
  */
 void sm750_enable_gpio(unsigned int enable);
 
-/*
- * This function enable/disable the I2C Engine
- */
-void sm750_enable_i2c(unsigned int enable);
-
 #endif
diff --git a/drivers/staging/sm750fb/sm750_cursor.h b/drivers/staging/sm750fb/sm750_cursor.h
index 88fa02f6377a..51ba0da0270c 100644
--- a/drivers/staging/sm750fb/sm750_cursor.h
+++ b/drivers/staging/sm750fb/sm750_cursor.h
@@ -10,6 +10,4 @@ void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y);
 void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg);
 void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
 			      const u8 *data, const u8 *mask);
-void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
-			       const u8 *data, const u8 *mask);
 #endif
-- 
2.54.0


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

* Re: [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include
  2026-05-12  6:34 ` [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include Chhabilal Dangal
@ 2026-05-12  7:20   ` Ahmet Sezgin Duran
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmet Sezgin Duran @ 2026-05-12  7:20 UTC (permalink / raw)
  To: Chhabilal Dangal, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel

On 5/12/26 9:34 AM, Chhabilal Dangal wrote:

> -
> -void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
> -			       const u8 *pcol, const u8 *pmsk)
> -{
> -	int i, j, count, pitch, offset;
> -	u8 color, mask;
> -	u16 data;
> -	void __iomem *pbuffer, *pstart;
> -
> -	/*  in byte*/
> -	pitch = cursor->w >> 3;
> -
> -	/* in byte	*/
> -	count = pitch * cursor->h;
> -
> -	/* in byte */
> -	offset = cursor->max_w * 2 / 8;
> -
> -	data = 0;
> -	pstart = cursor->vstart;
> -	pbuffer = pstart;
> -
> -	for (i = 0; i < count; i++) {
> -		color = *pcol++;
> -		mask = *pmsk++;
> -		data = 0;
> -
> -		for (j = 0; j < 8; j++) {
> -			if (mask & (1 << j))
> -				data |= ((color & (1 << j)) ? 1 : 2) << (j * 2);
> -		}
> -		iowrite16(data, pbuffer);
> -
> -		/* assume pitch is 1,2,4,8,...*/
> -		if (!(i & (pitch - 1))) {
> -			/* need a return */
> -			pstart += offset;
> -			pbuffer = pstart;
> -		} else {
> -			pbuffer += sizeof(u16);
> -		}
> -	}
> -}

Did you create this patch from Greg's latest staging-testing branch?

Your patch doesn't even apply. `sm750_hw_cursor_set_data2` function does 
not exist.

Regards,
Ahmet Sezgin Duran

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

* Re: [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include
  2026-05-12  6:34 [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Chhabilal Dangal
  2026-05-12  6:34 ` [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include Chhabilal Dangal
  2026-05-12  6:34 ` [PATCH v3 3/3] staging: sm750fb: remove unused functions Chhabilal Dangal
@ 2026-05-12  7:36 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-12  7:36 UTC (permalink / raw)
  To: Chhabilal Dangal
  Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
	linux-kernel

On Tue, May 12, 2026 at 12:19:55PM +0545, Chhabilal Dangal wrote:
> sm750_hw.c includes <asm/mtrr.h> under CONFIG_MTRR, but no
> mtrr_add/mtrr_del calls exist in the file; the driver uses
> arch_phys_wc_add/arch_phys_wc_del in sm750.c instead.
> 
> Remove the dead include.
> 
> Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750_hw.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index a2798d428663..f491d3aca468 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -13,10 +13,6 @@
>  #include <linux/vmalloc.h>
>  #include <linux/pagemap.h>
>  #include <linux/console.h>
> -#ifdef CONFIG_MTRR
> -#include <asm/mtrr.h>
> -#endif
> -#include <linux/platform_device.h>
>  #include <linux/sizes.h>
>  
>  #include "sm750.h"
> -- 
> 2.54.0
> 
> 

Please slow down.  Wait at least a full day between patch submissions.
There is no rush or deadline here.  As pointed out, your patches don't
even apply :(

Take a few days off, redo these.  Send them to yourself and see if you
can apply them from the message you send, and then, if all works, send
them out AFTER reading all of the review comments (again this series was
not sent properly, there is no version information...)

thanks,

greg k-h

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

end of thread, other threads:[~2026-05-12  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  6:34 [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include Chhabilal Dangal
2026-05-12  6:34 ` [PATCH v3 2/3] staging: sm750fb: remove unused <linux/platform_device.h> include Chhabilal Dangal
2026-05-12  7:20   ` Ahmet Sezgin Duran
2026-05-12  6:34 ` [PATCH v3 3/3] staging: sm750fb: remove unused functions Chhabilal Dangal
2026-05-12  7:36 ` [PATCH v3 1/3] staging: sm750fb: remove unused <asm/mtrr.h> include 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