Skip to contentSkip to conversation

fbdev/uvesafb: Remove uvesafb_exec() prototype from include/video/uvesafb.h

PATCH In review Jorge Maidana 2 participants 3 messages Oct 6, 2023 – Oct 16, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fbdev/uvesafb: Remove uvesafb_exec() prototype from include/video/uvesafb.h

uvesafb_exec() is a static function defined and called only in drivers/video/fbdev/uvesafb.c, remove the prototype from include/video/uvesafb.h.

Fixes the warning:
./include/video/uvesafb.h:112:12: warning: 'uvesafb_exec' declared 'static' but never defined [-Wunused-function] when including '<video/uvesafb.h>' in an external program.

---
 include/video/uvesafb.h | 2 --
 1 file changed, 2 deletions(-)
include/video/uvesafb.h +0 -2
index 8d2a3bfc8..47d96e75e 100644
@@ -109,8 +109,6 @@ struct uvesafb_ktask {
 	u32 ack;
 };
 
-static int uvesafb_exec(struct uvesafb_ktask *tsk);
-
 #define UVESAFB_EXACT_RES	1
 #define UVESAFB_EXACT_DEPTH	2
 
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 fbdev/uvesafb: Call cn_del_callback() at the end of uvesafb_exit()

Delete the v86d netlink only after all the VBE tasks have been completed.

Fixes initial state restore on module unload:
uvesafb: VBE state restore call failed (eax=0x4f04, err=-19)

---
 drivers/video/fbdev/uvesafb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/uvesafb.c +1 -1
index a1a67830f..e1f421e91 100644
@@ -1928,10 +1928,10 @@ static void uvesafb_exit(void)
 		}
 	}
 
-	cn_del_callback(&uvesafb_cn_id);
 	driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d);
 	platform_device_unregister(uvesafb_device);
 	platform_driver_unregister(&uvesafb_driver);
+	cn_del_callback(&uvesafb_cn_id);
 }
 
 module_exit(uvesafb_exit);
Signature · 1 line
2.30.2
maintainer
#2 lore raw
In reply to Jorge Maidana
Quoted 9 lines · Jorge Maidana

uvesafb_exec() is a static function defined and called only in drivers/video/fbdev/uvesafb.c, remove the prototype from include/video/uvesafb.h.

Fixes the warning:
./include/video/uvesafb.h:112:12: warning: 'uvesafb_exec' declared 'static' but never defined [-Wunused-function] when including '<video/uvesafb.h>' in an external program.

applied both patches.

Thanks!
Helge

Quoted 17 lines
---
  include/video/uvesafb.h | 2 --
  1 file changed, 2 deletions(-)
include/video/uvesafb.h +0 -2
index 8d2a3bfc8..47d96e75e 100644
@@ -109,8 +109,6 @@ struct uvesafb_ktask {
  	u32 ack;
  };
 
-static int uvesafb_exec(struct uvesafb_ktask *tsk);
-
  #define UVESAFB_EXACT_RES	1
  #define UVESAFB_EXACT_DEPTH	2