Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp639953ybe; Thu, 5 Sep 2019 03:39:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdJwBTnUhPC012AyzKVb5+NmLhOR5ZvQ818yi3uiixF1SoSXUISfHH1PbxcpWuz4ZcgqkR X-Received: by 2002:a17:90a:f0c6:: with SMTP id fa6mr2997230pjb.137.1567679988130; Thu, 05 Sep 2019 03:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567679988; cv=none; d=google.com; s=arc-20160816; b=BTlOCXvIyKHB27Q6DflMK/ycF3zGpoxVaxR+lV1XcYrl9UoMEFuWWfsey5zkAkkw3x 4CDPnhVe+PmhoWeI2KFkgJ7fJ5Q/5KhLK5+L5+zstQpPv3PqOHmJevRnddq6SGh5xAJT FSi3YHShtrmVPAZ/icabcT6oHiN/Q6wNUS6iIpe30K8UuD3GuHLCUC7I0s3sXhKC11Bc dnWAq2e/nXdZhNgBRL1iN6dIk++mpf+iKvZfF7WQZbeKY1nI1fF8tLA5I+HiPVY7FJ5Q KJvH2GgvE7eDftVbANZjlxT3xwEUulMuK43hIjltKwnlrBRivIKrDQybJ/0WXvjYAmEn XZBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=4a52L6J1AQn5Y4c1DM/df2eXYRHVyS6TNH/GqQn7deI=; b=oH6/O7SC+AApcVewhA4NKtqsOTKNROfBYXttQLs9xfsDcIDrG69Vn10vu49SjaW38y D1R3Hd5E2VItn1omXVppMRlFCl4z6XExS8ueRMY6o4VgMJx6lsNe4p+97ya4QjwaJF/u 7k8Bvm0FFT6C1HSzmMHauYrY/xBcAP1OpoVv6RwDIcK1R9bRykWhIl92ITt5l3TUUwdo uCiiSQZ0gs1MebELbjyALNN7d2TwJ8IE2ldjWQfAbRRUyA6lsLj7QdO3A602C+gdmjiF RVbp9toMPLsQf1fOxrWitn0MQNgu5JBlouNDhzYNcUC0GKhS21e235BGmNJ8nmQCOsvH PhcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si1618246plh.269.2019.09.05.03.39.32; Thu, 05 Sep 2019 03:39:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732487AbfIEKGY (ORCPT + 99 others); Thu, 5 Sep 2019 06:06:24 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:44062 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbfIEKGX (ORCPT ); Thu, 5 Sep 2019 06:06:23 -0400 Received: from localhost (unknown [89.248.140.11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 25BE61538755E; Thu, 5 Sep 2019 03:06:21 -0700 (PDT) Date: Thu, 05 Sep 2019 12:06:20 +0200 (CEST) Message-Id: <20190905.120620.474534663543605977.davem@davemloft.net> To: zhongjiang@huawei.com Cc: anna.schumaker@netapp.com, trond.myklebust@hammerspace.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] net: Use kzfree() directly From: David Miller In-Reply-To: <1567564752-6430-1-git-send-email-zhongjiang@huawei.com> References: <1567564752-6430-1-git-send-email-zhongjiang@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.2 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]); Thu, 05 Sep 2019 03:06:23 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zhong jiang Date: Wed, 4 Sep 2019 10:39:09 +0800 > With the help of Coccinelle. We find some place to replace. > > @@ > expression M, S; > @@ > > - memset(M, 0, S); > - kfree(M); > + kzfree(M); Series applied to net-next.