From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762608AbdEVU7s (ORCPT ); Mon, 22 May 2017 16:59:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55192 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759827AbdEVU7p (ORCPT ); Mon, 22 May 2017 16:59:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC87F4E358 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vyasevic@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC87F4E358 Reply-To: vyasevic@redhat.com Subject: Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() References: <2845df67-d35d-536a-0a53-b2eb83fe1ba5@users.sourceforge.net> <7db0cb49-109b-88a6-532f-c591cc8ffa85@users.sourceforge.net> To: SF Markus Elfring , linux-sctp@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Neil Horman , Vlad Yasevich Cc: LKML , kernel-janitors@vger.kernel.org From: Vlad Yasevich Organization: Red Hat Message-ID: <0937b8d5-bf8c-81c5-af58-0c7a629b7932@redhat.com> Date: Mon, 22 May 2017 16:59:43 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <7db0cb49-109b-88a6-532f-c591cc8ffa85@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 22 May 2017 20:59:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2017 12:38 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 17:28:14 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > Signed-off-by: Markus Elfring > --- > net/sctp/protocol.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c > index 2b1a6215bd2f..5e7c8a344770 100644 > --- a/net/sctp/protocol.c > +++ b/net/sctp/protocol.c > @@ -1447,5 +1447,4 @@ static __init int sctp_init(void) > if (!sctp_ep_hashtable) { > - pr_err("Failed endpoint_hash alloc\n"); > status = -ENOMEM; > goto err_ehash_alloc; > } > Acked-by: Vlad Yasevich At the time this was written, it was patterned after TCP. Since then TCP changed significantly. We can surely clean-up the pr_err() here and possibly update the code as well later. -vlad