public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mxc/gpio: make _set_value work with values != 0/1
Date: Mon, 11 Oct 2010 14:54:31 +0200	[thread overview]
Message-ID: <20101011125431.GX28242@pengutronix.de> (raw)
In-Reply-To: <877hhoopzm.fsf@macbook.be.48ers.dk>

On Mon, Oct 11, 2010 at 02:47:41PM +0200, Peter Korsgaard wrote:
> >>>>> "Sascha" == Sascha Hauer <s.hauer@pengutronix.de> writes:
> 
> Hi,
> 
>  Baruch> Alternative shorter version:
>  Baruch> l = (__raw_readl(reg) & (~(1 << offset))) | (!!value << offset);
> 
>  Sascha> This is shorter but I find this significantly harder to read and I bet
>  Sascha> the compiler generates the same code from both versions.
> 
> Agreed.
> 
>  >> Well, what do you know - I seem to be outnumbered ;)
>  >> 
>  >> Sasha, do you want the !! version instead? Then I'll resend.
> 
>  Sascha> I like the !! version. The only problem with this is that people tend
>  Sascha> to try to remove the !! as it looks like a noop at first sight.
> 
> So what then? Do you want me to change to !!, resend with the extra
> empty line removed or just let you remove the line when you apply it?

If noone replies with '!! totally sucks' within 2 minutes just send a
patch which changes it to !! and removes the extra empty line.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2010-10-11 12:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 11:59 [PATCH] mxc/gpio: make _set_value work with values != 0/1 Peter Korsgaard
2010-10-11 12:12 ` Marc Kleine-Budde
2010-10-11 12:18   ` Peter Korsgaard
2010-10-11 12:15 ` Uwe Kleine-König
2010-10-11 12:21   ` Peter Korsgaard
2010-10-11 13:19     ` Michał Nazarewicz
2010-10-11 12:17 ` Baruch Siach
2010-10-11 12:23   ` Peter Korsgaard
2010-10-11 12:39     ` Sascha Hauer
2010-10-11 12:47       ` Peter Korsgaard
2010-10-11 12:54         ` Sascha Hauer [this message]

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=20101011125431.GX28242@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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