lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20071120120651.af5d3159.akpm@linux-foundation.org>
Date:	Tue, 20 Nov 2007 12:06:51 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Richard MUSIL <richard.musil@...com>
Cc:	greg@...ah.com, linux-kernel@...r.kernel.org,
	tpmdd-devel@...ts.sourceforge.net, tpm@...horst.net
Subject: Re: [PATCH] - TPM device driver layer (tpm.c|h) - 2nd repost

On Tue, 20 Nov 2007 13:32:06 +0100
Richard MUSIL <richard.musil@...com> wrote:

> >> +	if (chip->vendor.release)
> >> +		chip->vendor.release(dev);
> >> +
> >> +	/* it *should* be: chip->release != NULL */
> > 
> > And that one's actually wrong in the context of kernel coding practices. 
> > But whatever.
> 
> Well I am not sure, what is exactly against coding practices (this is
> my first patch, so bear with me). Was it the comment? Or the "likely".

The code was

	/* it *should* be: chip->release != NULL */
	if (chip->release)

and the I took the comment to mean that it should be

	if (chip->release != NULL)

I was just pointing out that the test-pointer-as-truth-value trick is
smiled upon in kernel coding.

> But, anyway, I guess I was a bit paranoic. chip->release is set to 
> original device::release and this should be set to platform_device_release
> at least (and if someone messed with it, it should not be NULL anyway).
> So I removed complete condition.

>From the above it appears that the code comment misled me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ