linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arkfb: misplaced parentheses?
@ 2009-02-15 15:57 Roel Kluin
  2009-02-15 22:01 ` Ondrej Zajicek
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-02-15 15:57 UTC (permalink / raw)
  To: adaplas; +Cc: Andrew Morton, linux-fbdev-devel

I think below is what was intended? otherwise we could as well have written:

regval || (code[0] & 4) ? 0x80 : 0)

But it doesn't seem likely that regval should be considered as boolean

please review.
-------------------------->8------------------8<---------------------------
fix misplaced parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index 314d186..d583bea 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -470,7 +470,7 @@ static void ark_dac_read_regs(void *data, u8 *code, int count)
 
 	while (count != 0)
 	{
-		vga_wseq(NULL, 0x1C, regval | (code[0] & 4) ? 0x80 : 0);
+		vga_wseq(NULL, 0x1C, regval | (code[0] & 4 ? 0x80 : 0));
 		code[1] = vga_r(NULL, dac_regs[code[0] & 3]);
 		count--;
 		code += 2;
@@ -485,7 +485,7 @@ static void ark_dac_write_regs(void *data, u8 *code, int count)
 
 	while (count != 0)
 	{
-		vga_wseq(NULL, 0x1C, regval | (code[0] & 4) ? 0x80 : 0);
+		vga_wseq(NULL, 0x1C, regval | (code[0] & 4 ? 0x80 : 0));
 		vga_w(NULL, dac_regs[code[0] & 3], code[1]);
 		count--;
 		code += 2;

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arkfb: misplaced parentheses?
  2009-02-15 15:57 [PATCH] arkfb: misplaced parentheses? Roel Kluin
@ 2009-02-15 22:01 ` Ondrej Zajicek
  0 siblings, 0 replies; 2+ messages in thread
From: Ondrej Zajicek @ 2009-02-15 22:01 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Andrew Morton, linux-fbdev-devel, adaplas


[-- Attachment #1.1: Type: text/plain, Size: 535 bytes --]

On Sun, Feb 15, 2009 at 04:57:56PM +0100, Roel Kluin wrote:
> I think below is what was intended?

Yes. By coincidence, the curent code also works, but
it is definitely better to fix it.

> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Acked-by: Ondrej Zajicek <santiago@crfreenet.org>

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 415 bytes --]

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-15 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-15 15:57 [PATCH] arkfb: misplaced parentheses? Roel Kluin
2009-02-15 22:01 ` Ondrej Zajicek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).