* [PATCH 2/8] newport_con: fix no return statement in newport_show_logo
[not found] <20200818085655.12071-1-jslaby@suse.cz>
@ 2020-08-18 8:56 ` Jiri Slaby
2020-08-18 8:56 ` [PATCH 3/8] newport_con: make module's init & exit static using module_driver Jiri Slaby
1 sibling, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2020-08-18 8:56 UTC (permalink / raw)
To: gregkh
Cc: linux-serial, linux-kernel, Jiri Slaby,
Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-mips
When CONFIG_LOGO_SGI_CLUT224 is unset, newport_show_logo contains no
return, despite it should return a pointer. Add one returning NULL to
fix a compiler warning:
drivers/video/console/newport_con.c: In function 'newport_show_logo':
drivers/video/console/newport_con.c:132:1: warning: no return statement in function returning non-void
Note that the caller expects NULL from the function already.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-mips@vger.kernel.org
---
drivers/video/console/newport_con.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c
index 72f146d047d9..4d9110393479 100644
--- a/drivers/video/console/newport_con.c
+++ b/drivers/video/console/newport_con.c
@@ -131,6 +131,8 @@ static const struct linux_logo *newport_show_logo(void)
npregs->go.hostrw0 = *data++ << 24;
return logo;
+#else
+ return NULL;
#endif /* CONFIG_LOGO_SGI_CLUT224 */
}
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 3/8] newport_con: make module's init & exit static using module_driver
[not found] <20200818085655.12071-1-jslaby@suse.cz>
2020-08-18 8:56 ` [PATCH 2/8] newport_con: fix no return statement in newport_show_logo Jiri Slaby
@ 2020-08-18 8:56 ` Jiri Slaby
1 sibling, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2020-08-18 8:56 UTC (permalink / raw)
To: gregkh
Cc: linux-serial, linux-kernel, Jiri Slaby,
Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-mips
The compiler complains that newport_console_init and
newport_console_exit are not declared:
drivers/video/console/newport_con.c:745:12: warning: no previous prototype for 'newport_console_init'
drivers/video/console/newport_con.c:750:13: warning: no previous prototype for 'newport_console_exit'
Here, it translates into: they should be marked static. Do so by
converting the simple un/registration to module_driver().
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-mips@vger.kernel.org
---
drivers/video/console/newport_con.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c
index 4d9110393479..0d0989040c58 100644
--- a/drivers/video/console/newport_con.c
+++ b/drivers/video/console/newport_con.c
@@ -751,18 +751,6 @@ static struct gio_driver newport_driver = {
.probe = newport_probe,
.remove = newport_remove,
};
-
-int __init newport_console_init(void)
-{
- return gio_register_driver(&newport_driver);
-}
-
-void __exit newport_console_exit(void)
-{
- gio_unregister_driver(&newport_driver);
-}
-
-module_init(newport_console_init);
-module_exit(newport_console_exit);
+module_driver(newport_driver, gio_register_driver, gio_unregister_driver);
MODULE_LICENSE("GPL");
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-18 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200818085655.12071-1-jslaby@suse.cz>
2020-08-18 8:56 ` [PATCH 2/8] newport_con: fix no return statement in newport_show_logo Jiri Slaby
2020-08-18 8:56 ` [PATCH 3/8] newport_con: make module's init & exit static using module_driver Jiri Slaby
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).