From: Hareesh Nagarajan <hnagar2@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: davem@redhat.com
Subject: [PATCH] Trivial patch to remove list member from struct tcx_par in drivers/video/tcx.c
Date: Mon, 10 Oct 2005 21:30:35 -0500 [thread overview]
Message-ID: <434B23CB.7000609@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
This patch removes the list_head member 'list' from struct tcx_par in
the file drivers/video/tcx.c among other trivial cleanups. The member
'list' is never used. It turns out that other frame buffer code like
cg14.c, leo.c, bw2.c, etc. (in drivers/video) seem to have the same
extra list_head member in their respective *_par structures.
The patch applies to the 2.6.13.4 kernel sources.
(AFAICT, I am not missing anything; If I am, I'm sorry for wasting your
time.)
Thanks,
Hareesh Nagarajan
[-- Attachment #2: tcx.c-cleanup.patch --]
[-- Type: text/x-patch, Size: 1206 bytes --]
--- linux-2.6.13.4/drivers/video/tcx.c 2005-10-10 13:54:29.000000000 -0500
+++ linux-2.6.13.4-edit/drivers/video/tcx.c 2005-10-10 21:05:22.110156000 -0500
@@ -123,7 +123,6 @@
int lowdepth;
struct sbus_dev *sdev;
- struct list_head list;
};
/* Reset control plane so that WID is 8-bit plane. */
@@ -174,13 +173,13 @@
unsigned red, unsigned green, unsigned blue,
unsigned transp, struct fb_info *info)
{
+ if (regno >= 256)
+ return 1;
+
struct tcx_par *par = (struct tcx_par *) info->par;
struct bt_regs __iomem *bt = par->bt;
unsigned long flags;
- if (regno >= 256)
- return 1;
-
red >>= 8;
green >>= 8;
blue >>= 8;
@@ -442,7 +441,7 @@
tcx_reset(&all->info);
- tcx_blank(0, &all->info);
+ tcx_blank(FB_BLANK_UNBLANK, &all->info);
if (fb_alloc_cmap(&all->info.cmap, 256, 0)) {
printk(KERN_ERR "tcx: Could not allocate color map.\n");
@@ -490,8 +489,7 @@
struct list_head *pos, *tmp;
list_for_each_safe(pos, tmp, &tcx_list) {
- struct all_info *all = list_entry(pos, typeof(*all), list);
-
+ struct all_info *all = list_entry(pos, struct all_info, list);
unregister_framebuffer(&all->info);
fb_dealloc_cmap(&all->info.cmap);
kfree(all);
next reply other threads:[~2005-10-11 2:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 2:30 Hareesh Nagarajan [this message]
2005-10-11 17:49 ` [PATCH] Trivial patch to remove list member from struct tcx_par in drivers/video/tcx.c Geert Uytterhoeven
2005-10-12 1:22 ` Hareesh Nagarajan
2005-10-12 5:54 ` Geert Uytterhoeven
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=434B23CB.7000609@gmail.com \
--to=hnagar2@gmail.com \
--cc=davem@redhat.com \
--cc=linux-kernel@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