Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1268378ybt; Thu, 2 Jul 2020 00:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVU40zSURQbi8rC0XZ/lOIocII28nLrvE9rdZOX6LODpND1lViCii9983NReSApTS8tRDI X-Received: by 2002:a05:6402:559:: with SMTP id i25mr24992428edx.35.1593676318155; Thu, 02 Jul 2020 00:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593676318; cv=none; d=google.com; s=arc-20160816; b=glAGienmjdQJOwJgCtklVPO80E2fh91YClDwANrNDjh0oPCqIXDDS/VF32FNSSqjHi Bl3LyQo8AA3eWxVWOwLqe7zzZMCkh85Y0ilbnthEJn1+qqwg0pPY6tzzCy3jAjze0vjn mqRmlQwxpbwHgVqi7GytbmfVIR5nUtHUt0DnLiYDUdNGmRVjug92NLszMbLPoy8Z0SaF uo88AQHh6KGzUzm9pmD5SH95GAkgUHD0qGT9KlaUCWLPx9IvaASmbvTiE9Y3N0XI0gtu 8F8WpnLlxP2g1XuFo3HUJM8aWRHhtT5MJ6rXYGNbj9jDvqGjZxHdO/z7o0z+Q0oO8y34 6oRg== 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=jkzd63++U/iQ4mYIP0NvEZ/HOHMt3f2gHqnfJwlVwsQ=; b=q4EhQ5MXZw9hDFcD4+QNRMZLr7nxGEMymab5zw7AG8GIRK04awg8sJyuvzT51RfN48 iyu2znH4VJujET2rmoGYK2hnTPV+/dA6F513BMS0WRl0nT3yqGsSpS1UihaC+5L7029m idnJx5eAGhs3NoeAzV/DChicY/EniAG+GFfpo0s0vK+EgD1hZAiW/1hZTboCax3A2Ec8 uCuE64iQDsXvLkM3zLemxKsN6nEs5xYDwyclOCsw99nvYyjvKc6vnhg0eu8QUEK1kTVB 6z5/BVGAnCkPADFX/griYl6ivQLMf/tcPm3E4dH7MWXgQghzP03ltSxmk2a2XzcXCZsG /qUA== 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 md1si5404062ejb.749.2020.07.02.00.51.35; Thu, 02 Jul 2020 00:51:58 -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 S1727847AbgGBHvb (ORCPT + 99 others); Thu, 2 Jul 2020 03:51:31 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7344 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725994AbgGBHva (ORCPT ); Thu, 2 Jul 2020 03:51:30 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id CBB0FB43E4E67814F373; Thu, 2 Jul 2020 15:51:27 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Jul 2020 15:51:19 +0800 From: Tian Tao To: , , , , , , , , , CC: Subject: [PATCH v3] drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() Date: Thu, 2 Jul 2020 15:49:43 +0800 Message-ID: <1593676183-28525-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() v3: still fixed include statements sorted alphabetically. v2: keep the DRM include statements sorted alphabetically. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- 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..249c298 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -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