Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1087791ybt; Wed, 1 Jul 2020 18:34:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKCifil5s6EZ9EgsoEXEv6lB10FBW9TEbeFfMQpgZD/ECNXM2CYrv5yKwkqSMjVjEsydQa X-Received: by 2002:a50:f187:: with SMTP id x7mr30727032edl.59.1593653689680; Wed, 01 Jul 2020 18:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593653689; cv=none; d=google.com; s=arc-20160816; b=l8htp2QAoUM9IuyDE3x9X2EFnU9qm5yR9bKr0hRowDUQIjEDCvVN7ldhhZKWLerWJf WzrGkUB3RKIG+jw6H7SSlE/gDnJrQC6F5GVOcqnjjbBx9cQzLSckHIhjQAE6dH6ot0d4 w7iaI1E6heOSrZwnzQTZo82kRkPrmvALVdLSWs4tqoXoTlOEI/OJyZA+4guVbBXT1MIh 019mInxOGK7E67L0tu5j1ETN6LxEHFztXpm48934BzbQm8QZJyTcWlMlE3BRF5x/idpp pA73zIa4fPN5ZRhTyJuSeAA8VGTTIX7xSpLetS6FWeBYZyLYkRyt92WsRO2xT5Ii24hc LAaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Udw2Sejn4/e0gwr9la+4mp2ZJLIABXxkFruGd0LmWaw=; b=NkN0pS4qxyPT6s6V5bvlG4fcrmevTtJa/xLr/WuHpAzaEur/iKhG8D6Tybo8ckWg/9 PNIgmB2DP2EntQfjQgqIBO7W1IPnbnDLNs+hgj9pZz+6JFjSijB5OcldvyVVMz/9+NSc BEQq+8C+sMxm4bakFP7vzCS8AFPnuyeiZoH5t8DskzPcOoEiFCc280KDLxXG4lc8/yGy sm9vKGPGqHVkJd+8+SlZdnDmY1HArt1194+goCQoirgel7DchKquQuvCYBt7ZHtGwEnh flkTlHp4Hpf8ihKq3mnn/wmFnF0K4eVk8D17O0dqf5YLBnyjNqj+WN1HrZS4H3SHDulW TtjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by12si4687800edb.99.2020.07.01.18.34.26; Wed, 01 Jul 2020 18:34:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728823AbgGBBZe (ORCPT + 99 others); Wed, 1 Jul 2020 21:25:34 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6794 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728427AbgGBBXm (ORCPT ); Wed, 1 Jul 2020 21:23:42 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8754BC6A2447C86627A7; Thu, 2 Jul 2020 09:23:37 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Jul 2020 09:23:29 +0800 From: Tian Tao To: , , , , , , , , , CC: Subject: [PATCH] drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() Date: Thu, 2 Jul 2020 09:21:54 +0800 Message-ID: <1593652914-19639-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org using the new API drmm_kzalloc() instead of devm_kzalloc() Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index a6fd0c2..2f20704 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "hibmc_drm_drv.h" #include "hibmc_drm_regs.h" @@ -267,7 +268,7 @@ static int hibmc_load(struct drm_device *dev) struct hibmc_drm_private *priv; int ret; - priv = devm_kzalloc(dev->dev, sizeof(*priv), GFP_KERNEL); + priv = drmm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) { DRM_ERROR("no memory to allocate for hibmc_drm_private\n"); return -ENOMEM; -- 2.7.4