From patchwork Thu Aug 20 10:00:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yalin wang X-Patchwork-Id: 7043271 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 673F0C05AC for ; Thu, 20 Aug 2015 10:00:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B5A2205D3 for ; Thu, 20 Aug 2015 10:00:28 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B135F205D4 for ; Thu, 20 Aug 2015 10:00:27 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7BBC8182625; Thu, 20 Aug 2015 03:00:27 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 58F2A182619 for ; Thu, 20 Aug 2015 03:00:26 -0700 (PDT) Received: by pdrh1 with SMTP id h1so12819745pdr.0 for ; Thu, 20 Aug 2015 03:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=rStgFiGy7RfEcu5fDm1xHlhAHJsLzf93flCXg6zJkkk=; b=UP0D2OfFls3gSncAuGVYzB4JBRUHQI6eqnTkyvzb25ZBKgr1dV5Kyma2If+j2HEIvt U8dlrUyWoQCBBonvwa1cn4sKdnPMr9v7fbnbK/ONvlMJZtoe54nNjRi4hM85LmQAhfbC xOJCKd6uk1JkbVaKw2VsCIjqzTNcIHhWv0d3nPfdT6fogDVgJpO2MDSnx5Pu8IrXVwSz tKr6RLkbBOWtggldtlOQlvJW0h+Yq7eYCCvXEdDVjldHMwOnBIS9nR7uv8pLZlo6Ea1D qgFHMTqwKPZxj9t39+SvoVPAXC53olKB5vDV2jB8y4yelTVlEeCfPQw67fmChk842RkE rIsQ== X-Received: by 10.70.109.136 with SMTP id hs8mr4947543pdb.160.1440064825612; Thu, 20 Aug 2015 03:00:25 -0700 (PDT) Received: from ubuntu.localdomain ([17.87.20.100]) by smtp.googlemail.com with ESMTPSA id d8sm3778624pat.0.2015.08.20.03.00.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Aug 2015 03:00:24 -0700 (PDT) From: yalin wang To: dan.j.williams@intel.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH] nvdimm: change to use generic kvfree() Date: Thu, 20 Aug 2015 18:00:09 +0800 Message-Id: <1440064809-26036-1-git-send-email-yalin.wang2010@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: yalin wang X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: yalin wang Reviewed-by: Ross Zwisler --- drivers/nvdimm/dimm_devs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c index c05eb80..651b8d1 100644 --- a/drivers/nvdimm/dimm_devs.c +++ b/drivers/nvdimm/dimm_devs.c @@ -241,10 +241,7 @@ void nvdimm_drvdata_release(struct kref *kref) nvdimm_free_dpa(ndd, res); nvdimm_bus_unlock(dev); - if (ndd->data && is_vmalloc_addr(ndd->data)) - vfree(ndd->data); - else - kfree(ndd->data); + kvfree(ndd->data); kfree(ndd); put_device(dev); }