public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Richard MUSIL <richard.musil@st.com>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org,
	tpmdd-devel@lists.sourceforge.net, tpm@selhorst.net
Subject: Re: [PATCH] - TPM device driver layer (tpm.c|h) - 2nd repost
Date: Tue, 20 Nov 2007 12:06:51 -0800	[thread overview]
Message-ID: <20071120120651.af5d3159.akpm@linux-foundation.org> (raw)
In-Reply-To: <4742D3C6.5000101@st.com>

On Tue, 20 Nov 2007 13:32:06 +0100
Richard MUSIL <richard.musil@st.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.

  parent reply	other threads:[~2007-11-20 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23  8:46 [PATCH] - TPM device driver layer (tpm.c|h) Richard MUSIL
2007-08-23  9:26 ` Greg KH
2007-09-25 13:14   ` [PATCH] - TPM device driver layer (tpm.c|h) - repost Richard MUSIL
2007-09-25 14:11     ` Greg KH
2007-09-28  8:08       ` [tpmdd-devel] " Marcel Selhorst
2007-11-20  6:37     ` Andrew Morton
2007-11-20 12:32       ` [PATCH] - TPM device driver layer (tpm.c|h) - 2nd repost Richard MUSIL
2007-11-20 12:53         ` Richard MUSIL
2007-11-20 20:06         ` Andrew Morton [this message]
2007-11-18 23:13 ` [tpmdd-devel] [PATCH] - TPM device driver layer (tpm.c|h) Marcel Selhorst
2007-11-19  5:09   ` Greg KH
2007-11-19  6:42     ` Marcel Selhorst

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=20071120120651.af5d3159.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.musil@st.com \
    --cc=tpm@selhorst.net \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /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