All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Helge Deller" <deller@gmx.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	dri-devel@lists.freedesktop.org,
	"Jaya Kumar" <jayalk@intworks.biz>
Subject: [PATCH 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field
Date: Fri, 20 Jan 2023 13:08:20 +0100	[thread overview]
Message-ID: <20230120120822.2536032-2-javierm@redhat.com> (raw)
In-Reply-To: <20230120120822.2536032-1-javierm@redhat.com>

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

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
-- 
2.39.0


WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Noralf Trønnes" <noralf@tronnes.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Daniel Vetter" <daniel@ffwll.ch>, "Helge Deller" <deller@gmx.de>,
	"Jaya Kumar" <jayalk@intworks.biz>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: [PATCH 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field
Date: Fri, 20 Jan 2023 13:08:20 +0100	[thread overview]
Message-ID: <20230120120822.2536032-2-javierm@redhat.com> (raw)
In-Reply-To: <20230120120822.2536032-1-javierm@redhat.com>

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

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
-- 
2.39.0


  reply	other threads:[~2023-01-20 12:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 12:08 [PATCH 0/3] Fixes and cleanup for DRM fbdev emulation and deferred I/O Javier Martinez Canillas
2023-01-20 12:08 ` Javier Martinez Canillas
2023-01-20 12:08 ` Javier Martinez Canillas [this message]
2023-01-20 12:08   ` [PATCH 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field Javier Martinez Canillas
2023-01-20 12:17   ` Thomas Zimmermann
2023-01-20 12:17     ` Thomas Zimmermann
2023-01-20 12:08 ` [PATCH 2/3] drm/fb-helper: Check fb_deferred_io_init() return value Javier Martinez Canillas
2023-01-20 12:08   ` Javier Martinez Canillas
2023-01-20 12:20   ` Thomas Zimmermann
2023-01-20 12:20     ` Thomas Zimmermann
2023-01-20 12:08 ` [PATCH 3/3] drm/fb-helper: Use a per-driver FB deferred I/O handler Javier Martinez Canillas
2023-01-20 12:08   ` Javier Martinez Canillas
2023-01-21  4:00   ` kernel test robot
2023-01-21  4:00     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230120120822.2536032-2-javierm@redhat.com \
    --to=javierm@redhat.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jayalk@intworks.biz \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.