From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] qed: fix kzalloc-simple.cocci warnings Date: Mon, 24 Apr 2017 12:03:27 -0400 (EDT) Message-ID: <20170424.120327.187268095994980448.davem@davemloft.net> References: <201704210853.tUPLU4Mh%fengguang.wu@intel.com> <20170421002007.GA8379@lkp-sbx04> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sudarsana.kalluru@cavium.com, kbuild-all@01.org, netdev@vger.kernel.org, Yuval.Mintz@cavium.com, Ariel.Elior@cavium.com, everest-linux-l2@cavium.com, linux-kernel@vger.kernel.org To: fengguang.wu@intel.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:52420 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S972746AbdDXQD2 (ORCPT ); Mon, 24 Apr 2017 12:03:28 -0400 In-Reply-To: <20170421002007.GA8379@lkp-sbx04> Sender: netdev-owner@vger.kernel.org List-ID: From: kbuild test robot Date: Fri, 21 Apr 2017 08:20:07 +0800 > drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1267:13-20: WARNING: kzalloc should be used for dcbx_info, instead of kmalloc/memset > > > Use kzalloc rather than kmalloc followed by memset with 0 > > This considers some simple cases that are common and easy to validate > Note in particular that there are no ...s in the rule, so all of the > matched code has to be contiguous > > Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > > CC: sudarsana.kalluru@cavium.com > Signed-off-by: Fengguang Wu I intentionally let this change happen. It was less risky than asking the submitter who introduced it to make another respin to keep the kzalloc().