diff mbox series

[1/3] fbdev: Remove unused struct fb_deferred_io .first_io field

Message ID 20230120120822.2536032-2-javierm@redhat.com (mailing list archive)
State Superseded
Headers show
Series Fixes and cleanup for DRM fbdev emulation and deferred I/O | expand

Commit Message

Javier Martinez Canillas Jan. 20, 2023, 12:08 p.m. UTC
This optional callback was added in the commit 1f45f9dbb392 ("fb_defio:
add first_io callback") but it was never used by a driver. Let's remove
it since it's unlikely that will be used after a decade that was added.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 drivers/video/fbdev/core/fb_defio.c | 4 ----
 include/linux/fb.h                  | 1 -
 2 files changed, 5 deletions(-)

Comments

Thomas Zimmermann Jan. 20, 2023, 12:17 p.m. UTC | #1
Am 20.01.23 um 13:08 schrieb Javier Martinez Canillas:
> This optional callback was added in the commit 1f45f9dbb392 ("fb_defio:
> add first_io callback") but it was never used by a driver. Let's remove
> it since it's unlikely that will be used after a decade that was added.
> 
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

I vaguely remember that this was important at some point. Maybe before 
the big rework of the pagelist? Don't know; it's unused now.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
> 
>   drivers/video/fbdev/core/fb_defio.c | 4 ----
>   include/linux/fb.h                  | 1 -
>   2 files changed, 5 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
> index c730253ab85c..1b680742b7f3 100644
> --- a/drivers/video/fbdev/core/fb_defio.c
> +++ b/drivers/video/fbdev/core/fb_defio.c
> @@ -157,10 +157,6 @@ static vm_fault_t fb_deferred_io_track_page(struct fb_info *info, unsigned long
>   	/* protect against the workqueue changing the page list */
>   	mutex_lock(&fbdefio->lock);
>   
> -	/* first write in this cycle, notify the driver */
> -	if (fbdefio->first_io && list_empty(&fbdefio->pagereflist))
> -		fbdefio->first_io(info);
> -
>   	pageref = fb_deferred_io_pageref_get(info, offset, page);
>   	if (WARN_ON_ONCE(!pageref)) {
>   		ret = VM_FAULT_OOM;
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index 30183fd259ae..daf336385613 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -215,7 +215,6 @@ struct fb_deferred_io {
>   	struct mutex lock; /* mutex that protects the pageref list */
>   	struct list_head pagereflist; /* list of pagerefs for touched pages */
>   	/* callback */
> -	void (*first_io)(struct fb_info *info);
>   	void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
>   };
>   #endif
diff mbox series

Patch

diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
index c730253ab85c..1b680742b7f3 100644
--- a/drivers/video/fbdev/core/fb_defio.c
+++ b/drivers/video/fbdev/core/fb_defio.c
@@ -157,10 +157,6 @@  static vm_fault_t fb_deferred_io_track_page(struct fb_info *info, unsigned long
 	/* protect against the workqueue changing the page list */
 	mutex_lock(&fbdefio->lock);
 
-	/* first write in this cycle, notify the driver */
-	if (fbdefio->first_io && list_empty(&fbdefio->pagereflist))
-		fbdefio->first_io(info);
-
 	pageref = fb_deferred_io_pageref_get(info, offset, page);
 	if (WARN_ON_ONCE(!pageref)) {
 		ret = VM_FAULT_OOM;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 30183fd259ae..daf336385613 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -215,7 +215,6 @@  struct fb_deferred_io {
 	struct mutex lock; /* mutex that protects the pageref list */
 	struct list_head pagereflist; /* list of pagerefs for touched pages */
 	/* callback */
-	void (*first_io)(struct fb_info *info);
 	void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
 };
 #endif