From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932736AbcIBRor (ORCPT ); Fri, 2 Sep 2016 13:44:47 -0400 Received: from smtprelay0109.hostedemail.com ([216.40.44.109]:34334 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753352AbcIBRoo (ORCPT ); Fri, 2 Sep 2016 13:44:44 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3874:4250:4321:5007:7903:8603:10004:10400:10848:11232:11658:11914:12043:12114:12660:12740:13069:13095:13161:13181:13229:13311:13357:13439:13894:14659:14721:21080:21433:30012:30041:30054:30064:30070:30083:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: cry66_2642a00c82e06 X-Filterd-Recvd-Size: 2069 Message-ID: <1472838261.6758.74.camel@perches.com> Subject: Re: [PATCH] qed: fix kzalloc-simple.cocci warnings From: Joe Perches To: Yuval Mintz , kbuild test robot , David Miller Cc: "kbuild-all@01.org" , netdev , Ariel Elior , Dept-Eng Everest Linux L2 , linux-kernel , Sudarsana Kalluru Date: Fri, 02 Sep 2016 10:44:21 -0700 In-Reply-To: References: <201609011409.GGSqCknq%fengguang.wu@intel.com> <20160901064512.GA49421@lkp-sb04> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-09-01 at 07:37 +0000, Yuval Mintz wrote: > > drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1230:13-20: WARNING: kzalloc > > should be used for dcbx_info, instead of kmalloc/memset > > drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1192:13-20: WARNING: kzalloc > > should be used for dcbx_info, instead of kmalloc/memset > > > >  Use kzalloc rather than kmalloc followed by memset with 0 [] > One question the automated script - > Can't it [relative] easily be upgraded to also have 'Fixes:' as part > of its message? It's really not a "fix" as it has no real effect on behavior. The code is perfectly fine as is really. It is a code size reduction though. Another thing with a behavior change and one that would also reduce code size would be to remove the unnecessary OOM messages after the allocs. I'll send a patch for that.