mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Edgar Hucek <hostmaster@ed-soft.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] New Framebuffer for Intel based Macs
Date: Tue, 20 Jun 2006 10:38:57 -0700	[thread overview]
Message-ID: <20060620103857.632a0747.rdunlap@xenotime.net> (raw)
In-Reply-To: <4497FA12.8090708@ed-soft.at>

On Tue, 20 Jun 2006 15:37:22 +0200 Edgar Hucek wrote:

> This patch add a new framebuffer driver for the Intel Based macs.
> This framebuffer is needed when booting from EFI to get something
> out the box ;)


To the extent possible, please list #include files in
alpha order within each group of <linux>, <asm>, etc.


+typedef enum _MAC_TAPE {
+	M_I17,
+	M_I20,
+	M_MINI,
+	M_MACBOOK,
+	M_NEW
+} MAC_TAPE;

What is TAPE?  should this be TYPE?

Use hard tabs on this line:
+      	.activate	= FB_ACTIVATE_NOW,


+static int             inverse   = 0;
+static int             mtrr      = 0; /* disable mtrr */
+static int	       vram_remap __initdata = 0; /* Set amount of memory to be used */
+static int	       vram_total __initdata = 0; /* Set total amount of memory */
+static int             depth;
+static int             model = M_NEW;
+static int             manual_height = 0;
+static int             manual_width = 0;

Misaligned.  Using hard tabs would help.

+		if (! strcmp(this_opt, "inverse"))
+			inverse=1;

No space between ! and strcmp (multiple places).
Do put spaces around '=' sign.

+#define dac_reg	(0x3c8)
+#define dac_val	(0x3c9)

Are these used?  And the parens are superfluous.
However, if you want to use parens, then using them here would
make more sense:
+#define	DEFAULT_FB_MEM	1024*1024*16

+	if(manual_height > 0)
+		screen_info.lfb_height = manual_height;
+	if(manual_width > 0)
+		screen_info.lfb_width = manual_width;

Space after 'if'.

+	printk(KERN_INFO "imacfb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
+	       imacfb_defined.xres, imacfb_defined.yres, imacfb_defined.bits_per_pixel, imacfb_fix.line_length, screen_info.pages);

Break long source lines at < 80 columns, please.

+	if (imacfb_defined.bits_per_pixel <= 8) {
+		depth = imacfb_defined.green.length;
+		imacfb_defined.red.length =
+		imacfb_defined.green.length =
+		imacfb_defined.blue.length =
+		imacfb_defined.bits_per_pixel;
+	}

Maybe that last line should be indented one more tab stop.
Anyway, they shouldn't all be at the same indentation.


---
~Randy

  parent reply	other threads:[~2006-06-20 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 13:37 Edgar Hucek
2006-06-20 15:14 ` Antonino A. Daplas
2006-06-20 17:38 ` Randy.Dunlap [this message]
     [not found] <6pOCE-1Dv-39@gated-at.bofh.it>
2006-06-20 14:21 ` Bodo Eggert
2006-06-20 14:43   ` Edgar Hucek

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=20060620103857.632a0747.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=hostmaster@ed-soft.at \
    --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

all inboxes | Powered by JetHome®