From: m.nazarewicz@samsung.com (Michał Nazarewicz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mxc/gpio: make _set_value work with values != 0/1
Date: Mon, 11 Oct 2010 15:19:23 +0200 [thread overview]
Message-ID: <op.vkexyla47p4s8u@pikus> (raw)
In-Reply-To: <87fwwcor79.fsf@macbook.be.48ers.dk>
On Mon, 11 Oct 2010 14:21:30 +0200, Peter Korsgaard <jacmet@sunsite.dk> wrote:
> Se my other reply. I don't feel strongly about it, but I for one don't
> remember the precedence rules for !! and << offhand.
A bit off-topic, but hopefuly it'll help someone:
1. (In C,) one argument operators have binding tighter than two (or three) argument
operators. (The only exception to this rule is the :: operator in C++ which has
the tighest binding of all operators.)
2. The next rule, is that one argument postfix operators has tigter binding
then prefix operators, thus *a++ is *(a++).
I find those two rules let me understand most operatrs use cases. Hope this
helps. :)
Also, I haven't followed the patch from the beginnig (just stumbled accross
some mails), but anoter possible solution to the problem would be to change
the type of "value" to "bool".
--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Micha? "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
next prev parent reply other threads:[~2010-10-11 13:19 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 [this message]
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
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=op.vkexyla47p4s8u@pikus \
--to=m.nazarewicz@samsung.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.