* [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic
@ 2011-02-21 9:09 Javier Martinez Canillas
2011-02-21 17:16 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2011-02-21 9:09 UTC (permalink / raw)
To: kernel-janitors
xgifb staging driver for XG20, XG21, XG40, XG42 frame buffer device
has a accelerator engine that never get used (XGIfb_accel is always 0).
Also the driver has a set of defines that hides the synchronization
mechanism used to access critical sections and a way to disable spinlocks
use at compile time.
In a earlier patch all the code that depends on the accelerator being active
was deleted because it was dead code. Since the only usage of this
synchronization defines were in that dead code, this patch removes all the
now unused spinlock conditional compilation logic.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
drivers/staging/xgifb/XGI_accel.c | 3 ---
drivers/staging/xgifb/XGI_accel.h | 14 --------------
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index e6241fe..7c69e07 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -105,9 +105,6 @@ XGI310Sync(void)
int XGIfb_initaccel(void)
{
-#ifdef XGIFB_USE_SPINLOCKS
- spin_lock_init(&xgi_video_info.lockaccel);
-#endif
return(0);
}
diff --git a/drivers/staging/xgifb/XGI_accel.h b/drivers/staging/xgifb/XGI_accel.h
index 5a0395b..3087e90 100644
--- a/drivers/staging/xgifb/XGI_accel.h
+++ b/drivers/staging/xgifb/XGI_accel.h
@@ -18,20 +18,6 @@
#ifndef _XGIFB_ACCEL_H
#define _XGIFB_ACCEL_H
-/* Guard accelerator accesses with spin_lock_irqsave? Works well without. */
-#undef XGIFB_USE_SPINLOCKS
-
-#ifdef XGIFB_USE_SPINLOCKS
-#include <linux/spinlock.h>
-#define CRITBEGIN spin_lock_irqsave(&xgi_video_info.lockaccel), critflags);
-#define CRITEND spin_unlock_irqrestore(&xgi_video_info.lockaccel), critflags);
-#define CRITFLAGS unsigned long critflags;
-#else
-#define CRITBEGIN
-#define CRITEND
-#define CRITFLAGS
-#endif
-
/* Definitions for the XGI engine communication. */
#define PATREGSIZE 384 /* Pattern register size. 384 bytes @ 0x8300 */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync
2011-02-21 9:09 [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic Javier Martinez Canillas
@ 2011-02-21 17:16 ` Javier Martinez Canillas
2011-02-21 17:26 ` [PATCH 3/3] Staging: xgifb: Remove unused function Dan Carpenter
2011-02-21 17:32 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2011-02-21 17:16 UTC (permalink / raw)
To: kernel-janitors
Due a cleanup in earlier patches, the function fbcon_XGI_sync now does nothing
so it has to be removed.
This patche removes the unused function.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
drivers/staging/xgifb/XGI_accel.c | 5 -----
drivers/staging/xgifb/XGI_main.h | 1 -
drivers/staging/xgifb/XGI_main_26.c | 2 +-
3 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index 7c69e07..905b34a 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -115,11 +115,6 @@ void XGIfb_syncaccel(void)
}
-int fbcon_XGI_sync(struct fb_info *info)
-{
- return 0;
-}
-
void fbcon_XGI_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
if (!rect->width || !rect->height)
diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h
index e8e2bfe..1b45414 100644
--- a/drivers/staging/xgifb/XGI_main.h
+++ b/drivers/staging/xgifb/XGI_main.h
@@ -797,7 +797,6 @@ extern void fbcon_XGI_fillrect(struct fb_info *info,
const struct fb_fillrect *rect);
extern void fbcon_XGI_copyarea(struct fb_info *info,
const struct fb_copyarea *area);
-extern int fbcon_XGI_sync(struct fb_info *info);
static int XGIfb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg);
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index b52e11f..b75059d 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1741,7 +1741,7 @@ static struct fb_ops XGIfb_ops = {
.fb_fillrect = fbcon_XGI_fillrect,
.fb_copyarea = fbcon_XGI_copyarea,
.fb_imageblit = cfb_imageblit,
- .fb_sync = fbcon_XGI_sync,
+ .fb_sync = NULL,
.fb_ioctl = XGIfb_ioctl,
/* .fb_mmap = XGIfb_mmap, */
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/3] Staging: xgifb: Remove unused function
2011-02-21 9:09 [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic Javier Martinez Canillas
2011-02-21 17:16 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
@ 2011-02-21 17:26 ` Dan Carpenter
2011-02-21 17:32 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-02-21 17:26 UTC (permalink / raw)
To: kernel-janitors
On Mon, Feb 21, 2011 at 06:16:45PM +0100, Javier Martinez Canillas wrote:
> --- a/drivers/staging/xgifb/XGI_main_26.c
> +++ b/drivers/staging/xgifb/XGI_main_26.c
> @@ -1741,7 +1741,7 @@ static struct fb_ops XGIfb_ops = {
> .fb_fillrect = fbcon_XGI_fillrect,
> .fb_copyarea = fbcon_XGI_copyarea,
> .fb_imageblit = cfb_imageblit,
> - .fb_sync = fbcon_XGI_sync,
> + .fb_sync = NULL,
It doesn't need to be set explicitly. It gets initialized to NULL
automatically by default.
regards,
dan carpenter
> .fb_ioctl = XGIfb_ioctl,
> /* .fb_mmap = XGIfb_mmap, */
> };
> --
> 1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync
2011-02-21 9:09 [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic Javier Martinez Canillas
2011-02-21 17:16 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
2011-02-21 17:26 ` [PATCH 3/3] Staging: xgifb: Remove unused function Dan Carpenter
@ 2011-02-21 17:32 ` Javier Martinez Canillas
2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2011-02-21 17:32 UTC (permalink / raw)
To: kernel-janitors
>> - .fb_sync = fbcon_XGI_sync,
>> + .fb_sync = NULL,
>
> It doesn't need to be set explicitly. It gets initialized to NULL
> automatically by default.
>
Ok, will resend a new version that just deletes it. Thank you.
Best regards,
--
-----------------------------------------
Javier Martínez Canillas
(+34) 682 39 81 69
PhD Student in High Performance Computing
Computer Architecture and Operating System Department (CAOS)
Universitat Autònoma de Barcelona
Barcelona, Spain
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-21 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 9:09 [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic Javier Martinez Canillas
2011-02-21 17:16 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
2011-02-21 17:26 ` [PATCH 3/3] Staging: xgifb: Remove unused function Dan Carpenter
2011-02-21 17:32 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox