From: Joe Perches <joe@perches.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
tipc-discussion@lists.sourceforge.net, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jon Maloy <jon.maloy@ericsson.com>,
Ying Xue <ying.xue@windriver.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: tipc: Delete error messages for failed memory allocations in three functions
Date: Tue, 23 May 2017 16:39:37 +0000 [thread overview]
Message-ID: <1495557577.2093.66.camel@perches.com> (raw)
In-Reply-To: <d07d0b1f-0038-e91d-4748-ea3e6dfb93f0@users.sourceforge.net>
On Tue, 2017-05-23 at 18:23 +0200, SF Markus Elfring wrote:
> > tipc_subseq_alloc does a kcalloc (memset to 0),
> > half of which is immediately overwritten.
> >
> > In other words, don't just blindly remove stuff,
> > understand what it does and improve it.
>
> Do you suggest another specific source code transformation pattern here?
For the somewhat hard-of-thinking,
something like krealloc would do nicely.
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
tipc-discussion@lists.sourceforge.net, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jon Maloy <jon.maloy@ericsson.com>,
Ying Xue <ying.xue@windriver.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: tipc: Delete error messages for failed memory allocations in three functions
Date: Tue, 23 May 2017 09:39:37 -0700 [thread overview]
Message-ID: <1495557577.2093.66.camel@perches.com> (raw)
In-Reply-To: <d07d0b1f-0038-e91d-4748-ea3e6dfb93f0@users.sourceforge.net>
On Tue, 2017-05-23 at 18:23 +0200, SF Markus Elfring wrote:
> > tipc_subseq_alloc does a kcalloc (memset to 0),
> > half of which is immediately overwritten.
> >
> > In other words, don't just blindly remove stuff,
> > understand what it does and improve it.
>
> Do you suggest another specific source code transformation pattern here?
For the somewhat hard-of-thinking,
something like krealloc would do nicely.
next prev parent reply other threads:[~2017-05-23 16:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 13:07 [PATCH] tipc: Delete error messages for failed memory allocations in three functions SF Markus Elfring
2017-05-23 13:07 ` SF Markus Elfring
2017-05-23 14:02 ` Joe Perches
2017-05-23 14:02 ` Joe Perches
2017-05-23 16:23 ` SF Markus Elfring
2017-05-23 16:23 ` SF Markus Elfring
2017-05-23 16:39 ` Joe Perches [this message]
2017-05-23 16:39 ` Joe Perches
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=1495557577.2093.66.camel@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=elfring@users.sourceforge.net \
--cc=jon.maloy@ericsson.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=ying.xue@windriver.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.