[U-Boot] [PATCH v2 2/2] Add a cli command to test the TPM device.

Mike Frysinger vapier at gentoo.org
Sat Oct 15 21:08:22 CEST 2011


On Saturday 15 October 2011 14:02:29 Marek Vasut wrote:
> On Saturday, October 15, 2011 05:39:08 AM Vadim Bendebury wrote:
> > --- /dev/null
> > +++ b/common/cmd_tpm.c
> > @@ -0,0 +1,111 @@
> > +/*
> > + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
> > + * Released under the 2-clause BSD license.
> 
> Are we ok with this ? Also, you say something about GPL in the same
> comment?

there's nothing wrong with adding files under the BSD license.  what is odd 
about this code though is that it says BSD on one line, and then it says 
GPL-2+ a few lines later.  pick one or the other.

> > +	/*
> > +	 * Verify that in case it is present, the first argument, it is
> > +	 * exactly one character in size.
> > +	 */
> > +	if (argc < 7) {
> > +		puts("command should be at least six bytes in size\n");
> > +		return ~0;
> 
> Ugh, return 1 isn't ok ? Using ~0 on int type is weird.

~0 is weird.  this should be 1 or -1.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111015/1452c232/attachment.pgp 


More information about the U-Boot mailing list