mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, Ondrej Zajicek <santiago@crfreenet.org>
Cc: linux-kernel@vger.kernel.org,
	James Simmons <jsimmons@infradead.org>,
	adaplas@pol.net
Subject: [-mm patch] drivers/video/{s3fb,svgalib}.c: possible cleanups
Date: Sat, 16 Dec 2006 14:56:57 +0100	[thread overview]
Message-ID: <20061216135657.GC3388@stusta.de> (raw)
In-Reply-To: <20061214225913.3338f677.akpm@osdl.org>

On Thu, Dec 14, 2006 at 10:59:13PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.19-mm1:
>...
> +fbdev-driver-for-s3-trio-virge.patch
>...
>  fbdev updates
>...

This patch contains the following possible cleanups:
- CodingStyle:
  - opening braces of functions at the beginning of the next line
  - C99 struct initializers
- make the following needlessly global functions static:
  - s3fb.c: s3fb_settile()
  - s3fb.c: s3fb_tilecopy()
  - s3fb.c: s3fb_tilefill()
  - s3fb.c: s3fb_tileblit()
  - s3fb.c: s3fb_tilecursor()
  - s3fb.c: s3fb_init()
  - svgalib.c: svga_regset_size()
- #if 0 the following unused global functions:
  - svga_wseq_multi()
  - svga_dump_var()

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/video/s3fb.c    |   29 +++++++++++++++++------------
 drivers/video/svgalib.c |   11 +++++------
 include/linux/svga.h    |    4 ----
 3 files changed, 22 insertions(+), 22 deletions(-)

--- linux-2.6.20-rc1-mm1/drivers/video/s3fb.c.old	2006-12-15 22:47:49.000000000 +0100
+++ linux-2.6.20-rc1-mm1/drivers/video/s3fb.c	2006-12-15 22:51:26.000000000 +0100
@@ -161,7 +161,8 @@
 
 /* Set font in text (tileblit) mode */
 
-void s3fb_settile(struct fb_info *info, struct fb_tilemap *map) {
+static void s3fb_settile(struct fb_info *info, struct fb_tilemap *map)
+{
 	const u8 *font = map->data;
 	u8* fb = (u8 *) info->screen_base;
 	int i, c;
@@ -185,7 +186,8 @@
 
 /* Copy area in text (tileblit) mode */
 
-void s3fb_tilecopy(struct fb_info *info, struct fb_tilearea *area) {
+static void s3fb_tilecopy(struct fb_info *info, struct fb_tilearea *area)
+{
 	int dx, dy;
 //	int colstride = 4;
 	int colstride = 2;
@@ -222,7 +224,8 @@
 
 /* Fill area in text (tileblit) mode */
 
-void s3fb_tilefill(struct fb_info *info, struct fb_tilerect *rect) {
+static void s3fb_tilefill(struct fb_info *info, struct fb_tilerect *rect)
+{
 	int dx, dy;
 //	int colstride = 8;
 	int colstride = 4;
@@ -244,7 +247,8 @@
 
 /* Write text in text (tileblit) mode */
 
-void s3fb_tileblit(struct fb_info *info, struct fb_tileblit *blit) {
+static void s3fb_tileblit(struct fb_info *info, struct fb_tileblit *blit)
+{
 	int dx, dy, i;
 //	int colstride = 8;
 	int colstride = 4;
@@ -270,7 +274,8 @@
 
 /* Set cursor in text (tileblit) mode */
 
-void s3fb_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor) {
+static void s3fb_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor)
+{
 	u8 cs = 0x0d;
 	u8 ce = 0x0e;
 	u16 pos =  cursor->sx + (info->var.xoffset /  8)
@@ -1183,12 +1188,12 @@
 MODULE_DEVICE_TABLE(pci, s3_devices);
 
 static struct pci_driver s3fb_pci_driver = {
-	name:"s3fb",
-	id_table:s3_devices,
-	probe:s3_pci_probe,
-	remove:__devexit_p(s3_pci_remove),
-//	suspend:s3_pci_suspend,
-//	resume:s3_pci_resume,
+	.name		= "s3fb",
+	.id_table	= s3_devices,
+	.probe		= s3_pci_probe,
+	.remove		= __devexit_p(s3_pci_remove),
+//	.suspend	= s3_pci_suspend,
+//	.resume		= s3_pci_resume,
 };
 
 /* Parse user speficied options */
@@ -1228,7 +1233,7 @@
 
 /* Driver Initialisation */
 
-int __init s3fb_init(void)
+static int __init s3fb_init(void)
 {
 
 #ifndef MODULE
--- linux-2.6.20-rc1-mm1/include/linux/svga.h.old	2006-12-15 22:52:12.000000000 +0100
+++ linux-2.6.20-rc1-mm1/include/linux/svga.h	2006-12-15 22:53:05.000000000 +0100
@@ -91,8 +91,6 @@
 
 
 void svga_wcrt_multi(const struct vga_regset *regset, u32 value);
-void svga_wseq_multi(const struct vga_regset *regset, u32 value);
-unsigned int svga_regset_size(const struct vga_regset *regset);
 
 void svga_set_default_gfx_regs(void);
 void svga_set_default_atc_regs(void);
@@ -100,8 +98,6 @@
 void svga_set_default_crt_regs(void);
 void svga_set_textmode_vga_regs(void);
 
-void svga_dump_var(struct fb_var_screeninfo *var, int node);
-
 int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node);
 int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node);
 void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, int node);
--- linux-2.6.20-rc1-mm1/drivers/video/svgalib.c.old	2006-12-15 22:54:31.000000000 +0100
+++ linux-2.6.20-rc1-mm1/drivers/video/svgalib.c	2006-12-15 22:54:56.000000000 +0100
@@ -42,8 +42,8 @@
 	}
 }
 
+#if 0
 /* Write a sequence register value spread across multiple registers */
-
 void svga_wseq_multi(const struct vga_regset *regset, u32 value) {
 
 	u8 regval, bitval, bitnum;
@@ -62,8 +62,9 @@
 		regset ++;
 	}
 }
+#endif  /*  0  */
 
-unsigned int svga_regset_size(const struct vga_regset *regset)
+static unsigned int svga_regset_size(const struct vga_regset *regset)
 {
 	u8 count = 0;
 
@@ -163,6 +164,7 @@
 	vga_w(NULL, VGA_ATT_W, 0x20);
 }
 
+#if 0
 void svga_dump_var(struct fb_var_screeninfo *var, int node)
 {
 	pr_debug("fb%d: var.vmode         : 0x%X\n", node, var->vmode);
@@ -180,6 +182,7 @@
 	pr_debug("fb%d: var.sync          : 0x%X\n", node, var->sync);
 	pr_debug("fb%d: var.pixclock      : %d\n\n", node, var->pixclock);
 }
+#endif  /*  0  */
 
 /* ------------------------------------------------------------------------- */
 
@@ -433,9 +436,7 @@
 }
 
 
-EXPORT_SYMBOL(svga_wseq_multi);
 EXPORT_SYMBOL(svga_wcrt_multi);
-EXPORT_SYMBOL(svga_regset_size);
 
 EXPORT_SYMBOL(svga_set_default_gfx_regs);
 EXPORT_SYMBOL(svga_set_default_atc_regs);
@@ -443,8 +444,6 @@
 EXPORT_SYMBOL(svga_set_default_crt_regs);
 EXPORT_SYMBOL(svga_set_textmode_vga_regs);
 
-EXPORT_SYMBOL(svga_dump_var);
-
 EXPORT_SYMBOL(svga_compute_pll);
 EXPORT_SYMBOL(svga_check_timings);
 EXPORT_SYMBOL(svga_set_timings);


  parent reply	other threads:[~2006-12-16 13:57 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-15  6:59 2.6.20-rc1-mm1 Andrew Morton
2006-12-15  6:59 ` BUG: NMI Watchdog detected LOCKUP (was: 2.6.20-rc1-mm1) Tilman Schmidt
2006-12-19 18:52   ` Thomas Gleixner
2006-12-19 19:56   ` [patch] hrtimers: add state tracking, fix Ingo Molnar
2006-12-20  1:38     ` Tilman Schmidt
2006-12-20 20:05     ` Tilman Schmidt
2006-12-15 14:46 ` OOPS: deref 0x14 at pdc_port_start+0x82 [Was: 2.6.20-rc1-mm1] Jiri Slaby
2006-12-15 19:24   ` Andrew Morton
2006-12-15 22:49     ` Jiri Slaby
2006-12-15 20:39 ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-15 21:01   ` 2.6.20-rc1-mm1 Andrew Morton
2006-12-17 11:07     ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-18  8:03       ` 2.6.20-rc1-mm1 Laurent Riffard
2006-12-18 18:35         ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-19 23:29           ` 2.6.20-rc1-mm1 Luben Tuikov
2006-12-18  7:44     ` 2.6.20-rc1-mm1 Jens Axboe
2006-12-15 23:26 ` WARNING (1) at .../arch/i386/mm/highmem.c:49 [Was: 2.6.20-rc1-mm1] Jiri Slaby
2006-12-16  0:16   ` Andrew Morton
2006-12-16  0:04 ` 2.6.20-rc1-mm1: unused sysrq_timer_list_show() Adrian Bunk
2006-12-16  7:56   ` [patch] debugging feature: SysRq-Q to print timers Ingo Molnar
2006-12-18 23:31     ` Andrew Morton
2006-12-18 23:45       ` Dave Jones
2006-12-19  0:00         ` Andrew Morton
2006-12-19 12:01           ` Ingo Molnar
2006-12-16 12:37 ` (Cross) compiling fails on first try (was Re: 2.6.20-rc1-mm1) Jan Dittmer
2006-12-16 13:56 ` [-mm patch] drivers/ide/pci/tc86c001.c: make a function static Adrian Bunk
2006-12-16 14:18   ` Alan
2006-12-17 18:08   ` Sergei Shtylyov
2006-12-17 20:52   ` Sergei Shtylyov
2006-12-16 13:56 ` [-mm patch] make uio_irq_handler() static Adrian Bunk
2006-12-20  6:09   ` Greg KH
2006-12-16 13:56 ` Adrian Bunk [this message]
2006-12-16 17:39   ` [-mm patch] drivers/video/{s3fb,svgalib}.c: possible cleanups Randy Dunlap
2006-12-16 18:16   ` Ondrej Zajicek
2006-12-16 13:57 ` [-mm patch] mm/vmscan.c: make a function static Adrian Bunk
2006-12-16 19:30 ` [-mm patch] noinitramfs cleanup Frederik Deweerdt
2006-12-18 13:38 ` [-mm patch] kill pxa2xx Kconfig warning Frederik Deweerdt
2006-12-18 20:06 ` 2.6.20-rc1-mm1 Bartlomiej Zolnierkiewicz
2006-12-19  0:29 ` 2.6.20-rc1-mm1 Randy Dunlap
2006-12-19  0:42   ` 2.6.20-rc1-mm1 Andrew Morton
2006-12-21 18:35 ` [-mm patch] ptrace: make {put,get}reg work again for gs and fs Frederik Deweerdt
2006-12-21 19:22   ` Jeremy Fitzhardinge
2006-12-21 20:53     ` Frederik Deweerdt
2006-12-21 21:59     ` Frederik Deweerdt
2006-12-22  2:00       ` Jeremy Fitzhardinge
     [not found]         ` <20061221181108.6cede9ba.akpm@osdl.org>
2006-12-22  6:06           ` Frederik Deweerdt
     [not found]             ` <20061221225414.de09c7df.akpm@osdl.org>
2006-12-22  7:00               ` Jeremy Fitzhardinge
2006-12-22  8:05               ` Frederik Deweerdt
2006-12-22  6:52           ` Jeremy Fitzhardinge
2006-12-22  6:55       ` Jeremy Fitzhardinge

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=20061216135657.GC3388@stusta.de \
    --to=bunk@stusta.de \
    --cc=adaplas@pol.net \
    --cc=akpm@osdl.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santiago@crfreenet.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome