Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751319AbdH1OFS convert rfc822-to-8bit (ORCPT ); Mon, 28 Aug 2017 10:05:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:44485 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdH1OFQ (ORCPT ); Mon, 28 Aug 2017 10:05:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,441,1498546800"; d="scan'208";a="1188882214" From: "Waskiewicz Jr, Peter" To: Dan Carpenter CC: SF Markus Elfring , "netdev@vger.kernel.org" , Evgeniy Polyakov , LKML , "kernel-janitors@vger.kernel.org" Subject: Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() Thread-Topic: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() Thread-Index: AQHTH2pkcImrtsVZ90y9AMr+YsBhnw== Date: Mon, 28 Aug 2017 14:05:14 +0000 Message-ID: References: <7b206228-b3e9-5cb9-873c-75b5d8aae23b@users.sourceforge.net> <20170828060545.yddjpqzitw46lgiu@mwanda> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.82.203] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 29 On 8/28/17 2:06 AM, Dan Carpenter wrote: > 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 >>> 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... And this is what I get for reading the patch with a crappy mailer...thanks Doubtlook. Sorry for the noise.