mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle Moffett <mrmacman_g4@mac.com>
To: "Antonino A. Daplas" <adaplas@gmail.com>
Cc: Christian Trefzer <ctrefzer@gmx.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] neofb: add more logic to determine sensibility of register readback
Date: Fri, 10 Feb 2006 11:41:34 -0500	[thread overview]
Message-ID: <632EF49A-33EB-4FAE-B2E2-F36446F9C8B6@mac.com> (raw)
In-Reply-To: <43EC7EA7.5030105@gmail.com>

On Feb 10, 2006, at 06:53, Antonino A. Daplas wrote:
> Christian Trefzer wrote:
>> +		par->PanelDispCntlRegRead = 0;
>> +		par->PanelDispCntlRegRead = 0;
>> +		par->PanelDispCntlRegRead = 0;
>> +		par->PanelDispCntlRegRead = 0;
>> +		par->PanelDispCntlRegRead = 1;
>
> You can save a few lines by
>
> par->PanelDispCntlRegRead = (blank_mode) ? 0 : 1;

How about the really simple so-obvious-its-impossible-to-misread  
solution?

par->PanelDispCntlRegRead = !blank_mode;

Personally I tend to get ?: constructs confused a _lot_, especially  
mistaking the really short ones like x?0:1 and x?1:0.  Those two are  
usually better represented as !x or !!x, respectively.

Cheers,
Kyle Moffett

--
I lost interest in "blade servers" when I found they didn't throw  
knives at people who weren't supposed to be in your machine room.
   -- Anthony de Boer



  parent reply	other threads:[~2006-02-10 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-08 20:22 [PATCH] neofb: avoid resetting display config on unblank Christian Trefzer
2006-02-10 11:36 ` [PATCH] neofb: add more logic to determine sensibility of register readback Christian Trefzer
2006-02-10 11:53   ` Antonino A. Daplas
2006-02-10 13:57     ` Christian Trefzer
2006-02-10 16:41     ` Kyle Moffett [this message]
2006-02-11 10:42       ` Christian Trefzer

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=632EF49A-33EB-4FAE-B2E2-F36446F9C8B6@mac.com \
    --to=mrmacman_g4@mac.com \
    --cc=adaplas@gmail.com \
    --cc=ctrefzer@gmx.de \
    --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®