From: Joe Perches <joe@perches.com>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: Kent Yoder <key@linux.vnet.ibm.com>,
Rajiv Andrade <mail@srajiv.net>,
Marcel Selhorst <tpmdd@selhorst.net>,
Sirrix AG <tpmdd@sirrix.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH v3] char/tpm: Use true and false for bools
Date: Thu, 29 Nov 2012 13:54:52 -0800 [thread overview]
Message-ID: <1354226092.1700.8.camel@joe-AO722> (raw)
In-Reply-To: <1354223321-3343-1-git-send-email-peterhuewe@gmx.de>
On Thu, 2012-11-29 at 22:08 +0100, Peter Huewe wrote:
> Bool initializations should use true and false. Bool tests don't need
> comparisons
[]
> .v3 for this tiny patch... shame on me.
Don't be silly...
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
[]
> @@ -545,7 +545,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
> rc = -ENODEV;
> goto out_err;
> }
> - itpm = (probe == 0) ? 0 : 1;
> + itpm = !!probe;
Even more trivia:
This !! isn't necessary as ints assigned to bool are converted
by the compiler to 0 or 1.
next prev parent reply other threads:[~2012-11-29 21:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 0:20 [PATCH] " Peter Huewe
2012-11-29 0:25 ` Al Viro
2012-11-29 0:39 ` [PATCH v2] " Peter Huewe
2012-11-29 0:42 ` [PATCH] " Peter Huewe
2012-11-29 16:06 ` Kent Yoder
2012-11-29 21:08 ` [PATCH v3] " Peter Huewe
2012-11-29 21:54 ` Joe Perches [this message]
2012-11-29 22:08 ` Kent Yoder
2012-11-29 22:16 ` Peter Hüwe
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=1354226092.1700.8.camel@joe-AO722 \
--to=joe@perches.com \
--cc=key@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@srajiv.net \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
--cc=tpmdd@sirrix.com \
--cc=viro@zeniv.linux.org.uk \
/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®