Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1721038
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() |
| Date | 2017-08-28 08:10 +0200 |
| Message-ID | <ujlpg-1UB-11@gated-at.bofh.it> (permalink) |
| References | <ujbpT-3yh-1@gated-at.bofh.it> <ujf0u-63Y-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Aug 27, 2017 at 11:16:06PM +0000, Waskiewicz Jr, Peter wrote: > On 8/27/17 3:26 PM, SF Markus Elfring wrote: > > From: Markus Elfring <elfring@users.sourceforge.net> > > Date: Sun, 27 Aug 2017 21:18:37 +0200 > > > > Omit an extra message for a memory allocation failure in this function. > > > > This issue was detected by using the Coccinelle software. > > Did coccinelle trip on the message or the fact you weren't returning NULL? > You've misread the patch somehow. The existing code has a NULL return and it's preserved in Markus's patch. This sort of patch is to fix a checkpatch.pl warning. The error message from this kzalloc() isn't going to get printed because it's a small allocation and small allocations always succeed in current kernels. But probably the main reason checkpatch complains is that kmalloc() already prints a stack trace and a bunch of other information so the printk doesn't add anyting. Removing it saves a little memory. I'm mostly a fan of running checkpatch on new patches or staging and not on old code... regards, dan carpenter
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-27 21:30 +0200
Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() "Waskiewicz Jr, Peter" <peter.waskiewicz.jr@intel.com> - 2017-08-28 01:20 +0200
Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-28 08:10 +0200
Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() "Waskiewicz Jr, Peter" <peter.waskiewicz.jr@intel.com> - 2017-08-28 16:10 +0200
Re: connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-28 09:10 +0200
Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() Evgeniy Polyakov <zbr@ioremap.net> - 2017-09-05 15:20 +0200
csiph-web