public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] tpm: don't use unneeded double brackets
@ 2014-06-18 20:59 Jeroen Hofstee
  2014-07-08  1:36 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Hofstee @ 2014-06-18 20:59 UTC (permalink / raw)
  To: u-boot

clang is tempted to inteprete such a condition as a assignment
as well. Since it isn't don't use double brackets.

cc: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 drivers/tpm/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tpm/tpm.c b/drivers/tpm/tpm.c
index b657334..bc0f964 100644
--- a/drivers/tpm/tpm.c
+++ b/drivers/tpm/tpm.c
@@ -411,7 +411,7 @@ static ssize_t tpm_transmit(const unsigned char *buf, size_t bufsiz)
 			goto out_recv;
 		}
 
-		if ((status == chip->vendor.req_canceled)) {
+		if (status == chip->vendor.req_canceled) {
 			error("Operation Canceled\n");
 			rc = -ECANCELED;
 			goto out;
-- 
1.8.3.2

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

* [U-Boot] tpm: don't use unneeded double brackets
  2014-06-18 20:59 [U-Boot] [PATCH] tpm: don't use unneeded double brackets Jeroen Hofstee
@ 2014-07-08  1:36 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-07-08  1:36 UTC (permalink / raw)
  To: u-boot

On Wed, Jun 18, 2014 at 10:59:48PM +0200, Jeroen Hofstee wrote:

> clang is tempted to inteprete such a condition as a assignment
> as well. Since it isn't don't use double brackets.
> 
> cc: Tom Wai-Hong Tam <waihong@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140707/e3a568e9/attachment.pgp>

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

end of thread, other threads:[~2014-07-08  1:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 20:59 [U-Boot] [PATCH] tpm: don't use unneeded double brackets Jeroen Hofstee
2014-07-08  1:36 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox