From: Tilman Schmidt <tilman@imap.cc>
To: David Miller <davem@davemloft.net>
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 00:38:26 +0200 [thread overview]
Message-ID: <4A2AEFE2.2090300@imap.cc> (raw)
In-Reply-To: <20090601.030434.141357758.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
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.
> 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.
Thanks,
Tilman
PS: Any objections against the other two patches?
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2009-06-06 22:38 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 [this message]
2009-06-07 11:27 ` David Miller
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=4A2AEFE2.2090300@imap.cc \
--to=tilman@imap.cc \
--cc=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 \
/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).