netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tilman@imap.cc
Cc: karsten-keil@t-online.de, isdn4linux@listserv.isdn4linux.de,
	i4ldeveloper@listserv.isdn4linux.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] isdn: patches for 2.6.31
Date: Sun, 07 Jun 2009 04:27:24 -0700 (PDT)	[thread overview]
Message-ID: <20090607.042724.238501430.davem@davemloft.net> (raw)
In-Reply-To: <4A2AEFE2.2090300@imap.cc>

From: Tilman Schmidt <tilman@imap.cc>
Date: Sun, 07 Jun 2009 00:38:26 +0200

> On 01.06.2009 12:04, David Miller wrote:
>> First problem in the second patch.  You're doing two things
>> at once.  You're adding function documentation and also adding
>> a NULL pointer check.
> 
> No problem. I can split the patch in two if you prefer it that way.

Thanks.

>> Second problem, the NULL pointer check is gratuitous.  Document
>> that the 'm' member has to be non-NULL and leave the check out.
> 
> That would be a bad solution for two reasons:
> First, the 'm' member is private to capiutil.{c,h}. Callers are
> not supposed to access it. Therefore it shouldn't be referred to
> in the interface documentation. At best, such a mention would
> leave users of the function confused how to assure that condition.
> At worst, it might mislead them into meddling directly with the
> member, thereby producing incorrect code.
> And second, the main use of capi_cmsg2str() is for error reporting
> and debugging output. Oopsing in an error handler is particularly
> troublesome. At the same time, the risk of the 'm' member being
> unexpectedly NULL is particularly high when something has gone
> wrong already. So a safety check is advisable in this case.

Fair enough.

> PS: Any objections against the other two patches?

I don't remember it's been so many days since I looked at
this series :-(

      reply	other threads:[~2009-06-07 11:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-30 23:32 [PATCH 0/3] isdn: patches for 2.6.31 Tilman Schmidt
2009-05-30 23:32 ` [PATCH 1/3] isdn: rename capi_ctr_reseted() to capi_ctr_down() Tilman Schmidt
2009-05-31  5:19   ` Marcel Holtmann
2009-05-30 23:32 ` [PATCH 2/3] isdn: prevent NULL ptr oops in capi_cmsg2str() Tilman Schmidt
2009-05-30 23:32 ` [PATCH 3/3] isdn: extend INTERFACE.CAPI document Tilman Schmidt
2009-06-01 10:04 ` [PATCH 0/3] isdn: patches for 2.6.31 David Miller
2009-06-06 22:38   ` Tilman Schmidt
2009-06-07 11:27     ` David Miller [this message]

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=20090607.042724.238501430.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=i4ldeveloper@listserv.isdn4linux.de \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=karsten-keil@t-online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tilman@imap.cc \
    /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;
as well as URLs for NNTP newsgroup(s).