From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S972797AbdDXQDl (ORCPT ); Mon, 24 Apr 2017 12:03:41 -0400 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 Date: Mon, 24 Apr 2017 12:03:27 -0400 (EDT) Message-Id: <20170424.120327.187268095994980448.davem@davemloft.net> To: fengguang.wu@intel.com 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 Subject: Re: [PATCH] qed: fix kzalloc-simple.cocci warnings From: David Miller In-Reply-To: <20170421002007.GA8379@lkp-sbx04> References: <201704210853.tUPLU4Mh%fengguang.wu@intel.com> <20170421002007.GA8379@lkp-sbx04> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Apr 2017 08:22:04 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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().