From: Javier Martinez Canillas <martinez.javier@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] Staging: xgifb: Removes dead code
Date: Mon, 21 Feb 2011 09:09:05 +0000 [thread overview]
Message-ID: <1298279347-8825-2-git-send-email-martinez.javier@gmail.com> (raw)
xgifb staging driver has code that dependens on XGIfb_accel != 0.
But as Dan Carpenter noticed, XGIfb_accel value is always 0 in current driver.
So there is code that never gets executed.
This patch removes this dead code.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
drivers/staging/xgifb/XGI_accel.c | 57 ++-----------------------------------
1 files changed, 3 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index 7954974..7f485fe 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -216,73 +216,22 @@ void XGIfb_syncaccel(void)
int fbcon_XGI_sync(struct fb_info *info)
{
- if(!XGIfb_accel) return 0;
- CRITFLAGS
-
- XGI310Sync();
-
- CRITEND
- return 0;
+ return 0;
}
void fbcon_XGI_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
- int col=0;
- CRITFLAGS
-
-
- if(!rect->width || !rect->height)
- return;
+ if (!rect->width || !rect->height)
+ return;
- if(!XGIfb_accel) {
cfb_fillrect(info, rect);
return;
- }
-
- switch(info->var.bits_per_pixel) {
- case 8: col = rect->color;
- break;
- case 16: col = ((u32 *)(info->pseudo_palette))[rect->color];
- break;
- case 32: col = ((u32 *)(info->pseudo_palette))[rect->color];
- break;
- }
-
-
- CRITBEGIN
- XGI310SetupForSolidFill(col, myrops[rect->rop], 0);
- XGI310SubsequentSolidFillRect(rect->dx, rect->dy, rect->width, rect->height);
- CRITEND
- XGI310Sync();
-
-
}
void fbcon_XGI_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{
- int xdir, ydir;
- CRITFLAGS
-
-
- if(!XGIfb_accel) {
cfb_copyarea(info, area);
return;
- }
-
- if(!area->width || !area->height)
- return;
-
- if(area->sx < area->dx) xdir = 0;
- else xdir = 1;
- if(area->sy < area->dy) ydir = 0;
- else ydir = 1;
-
- CRITBEGIN
- XGI310SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
- XGI310SubsequentScreenToScreenCopy(area->sx, area->sy, area->dx, area->dy, area->width, area->height);
- CRITEND
- XGI310Sync();
-
}
--
1.7.0.4
reply other threads:[~2011-02-21 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1298279347-8825-2-git-send-email-martinez.javier@gmail.com \
--to=martinez.javier@gmail.com \
--cc=kernel-janitors@vger.kernel.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