From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Tue, 10 Oct 2017 04:18:25 +0000 Subject: Re: [PATCH 1/3] net/atm: Delete an error message for a failed memory allocation in five functions Message-Id: <1507609105.3552.18.camel@perches.com> List-Id: References: <10a92558-1105-b947-86a2-6ac763cca36d@users.sourceforge.net> <5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net> In-Reply-To: <5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: SF Markus Elfring , netdev@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Augusto Mecking Caringi , Bhumika Goyal , "David S. Miller" , David Windsor , Elena Reshetova , Hans Liljestrand , Jarod Wilson , Johannes Berg , Kees Cook , Mitchell Blank Jr , Roopa Prabhu Cc: LKML , kernel-janitors@vger.kernel.org On Mon, 2017-10-09 at 22:49 +0200, SF Markus Elfring wrote: > Omit extra messages for a memory allocation failure in these functions. [] > diff --git a/net/atm/mpc.c b/net/atm/mpc.c > @@ -184,10 +184,8 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos) > } > > entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL); > - if (entry = NULL) { > - pr_info("mpoa: out of memory\n"); > + if (!entry) Unspecified change. Make sure your changelog is comprehensive. > return entry; > - } > entry->ipaddr = dst_ip; > entry->qos = *qos; > @@ -473,10 +471,8 @@ static const uint8_t *copy_macs(struct mpoa_client *mpc, > kfree(mpc->mps_macs); > mpc->number_of_mps_macs = 0; > mpc->mps_macs = kmalloc(num_macs * ETH_ALEN, GFP_KERNEL); > - if (mpc->mps_macs = NULL) { > - pr_info("(%s) out of mem\n", mpc->dev->name); > + if (!mpc->mps_macs) > return NULL; etc... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751928AbdJJESf (ORCPT ); Tue, 10 Oct 2017 00:18:35 -0400 Received: from smtprelay0237.hostedemail.com ([216.40.44.237]:47922 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750734AbdJJESd (ORCPT ); Tue, 10 Oct 2017 00:18:33 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2828:2899:3138:3139:3140:3141:3142:3352:3622:3866:3870:3871:4321:4385:5007:6737:10004:10400:10848:11026:11232:11658:11914:12048:12296:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:21080:21212:21433:21627:30029:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: cord54_fc82d44eee5b X-Filterd-Recvd-Size: 2415 Message-ID: <1507609105.3552.18.camel@perches.com> Subject: Re: [PATCH 1/3] net/atm: Delete an error message for a failed memory allocation in five functions From: Joe Perches To: SF Markus Elfring , netdev@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Augusto Mecking Caringi , Bhumika Goyal , "David S. Miller" , David Windsor , Elena Reshetova , Hans Liljestrand , Jarod Wilson , Johannes Berg , Kees Cook , Mitchell Blank Jr , Roopa Prabhu Cc: LKML , kernel-janitors@vger.kernel.org Date: Mon, 09 Oct 2017 21:18:25 -0700 In-Reply-To: <5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net> References: <10a92558-1105-b947-86a2-6ac763cca36d@users.sourceforge.net> <5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-10-09 at 22:49 +0200, SF Markus Elfring wrote: > Omit extra messages for a memory allocation failure in these functions. [] > diff --git a/net/atm/mpc.c b/net/atm/mpc.c > @@ -184,10 +184,8 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos) > } > > entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL); > - if (entry == NULL) { > - pr_info("mpoa: out of memory\n"); > + if (!entry) Unspecified change. Make sure your changelog is comprehensive. > return entry; > - } > entry->ipaddr = dst_ip; > entry->qos = *qos; > @@ -473,10 +471,8 @@ static const uint8_t *copy_macs(struct mpoa_client *mpc, > kfree(mpc->mps_macs); > mpc->number_of_mps_macs = 0; > mpc->mps_macs = kmalloc(num_macs * ETH_ALEN, GFP_KERNEL); > - if (mpc->mps_macs == NULL) { > - pr_info("(%s) out of mem\n", mpc->dev->name); > + if (!mpc->mps_macs) > return NULL; etc...