Re: tipc: Delete error messages for failed memory allocations in three functions

2017-05-23 Thread Joe Perches
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 so

Re: tipc: Delete error messages for failed memory allocations in three functions

2017-05-23 Thread SF Markus Elfring
> 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? Regards, Markus

Re: [PATCH] tipc: Delete error messages for failed memory allocations in three functions

2017-05-23 Thread Joe Perches
On Tue, 2017-05-23 at 15:07 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 23 May 2017 14:45:25 +0200 > > Omit four extra messages for memory allocation failures in these functions. This is fine but you should look to optimize or figure out whether optimization is desirable

[PATCH] tipc: Delete error messages for failed memory allocations in three functions

2017-05-23 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2017 14:45:25 +0200 Omit four extra messages for memory allocation failures in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf