Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1246892ybt; Thu, 2 Jul 2020 00:08:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmeisRWs9OuKXdgDDCDiOiIP4Z8KKUwaRscTVTkZqVQnh7D+lYkpTHM6WbFnBK3Jxwbux+ X-Received: by 2002:a17:906:48d3:: with SMTP id d19mr25480551ejt.180.1593673736850; Thu, 02 Jul 2020 00:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593673736; cv=none; d=google.com; s=arc-20160816; b=OAC66QUzPbUvBy3R+I1HmY2++CT3GOiZVUNGdK/5H4/MM0GFkYb+lBMxWW1RtiYBH3 Pu/OKwDERF6Xq4b4fLBKz7Bhw3UFsDZMXBBF+f2BY+yNQ4EXqvSbP96LQ5MR5j4T9Xro e15NReUuHsmWvKv/DChOmZnN925IGZW3zWlWh2xFKNm2IItDCEKK1/8nTRZdqW66j6eB eISRA4jHAdW3KrYDp+wjhMmC2mIsK+/cF3gJNn410O8TERON9d4TQut9PbTql4NuVq00 DY4aKdaB/xNaQrBo5pb9ZS3TapyRHgEELa0WToa1AGPudHBRQ8HUzmnywpk7GEXWhXbL 3IWg== 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=X3gOQn4e+doR3q2wm3LZprNSxLIHzufoTNSluP6yZgQ=; b=V4kgBYGO/9sdUwxsOjne1Le4+50EvAdTinEwc32rZCOjqgdwNjCONs2y1Raiz4vpAl KhKFH1F5xKWCVFPJcZuFRTqmXoSPZDr5l5nVgO15KcV+kXp3e2OSqLLQYy22Ku6rwzeP Rqt5JtzVhakRjzbdwyllzOlNRgGizK2cbcEH6Qszfwu7tR2NhMi8rroSSM1QBQGFsRml sKnqVBrzvXZ9C4fr5gahq4k999ft2jUaQH87JoEctOFI2n8OK6aRY1LJWvf0M6P75odF AzJVObB0udMBUJZVbp0y9LSUC7O6q8Y8cNsVMxhrDEs/IIGWKqhMove/01Z3j5SQlBT4 Wg/w== 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 bc17si5069070edb.392.2020.07.02.00.08.33; Thu, 02 Jul 2020 00:08:56 -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 S1726789AbgGBHI2 (ORCPT + 99 others); Thu, 2 Jul 2020 03:08:28 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7343 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726362AbgGBHI2 (ORCPT ); Thu, 2 Jul 2020 03:08:28 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 843A99133502F6EBF772; Thu, 2 Jul 2020 15:08:25 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Jul 2020 15:08:17 +0800 From: Tian Tao To: , , , , , , , , , CC: Subject: [PATCH v2] drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() Date: Thu, 2 Jul 2020 15:06:42 +0800 Message-ID: <1593673602-49027-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() 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 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index a6fd0c2..b557728 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -11,18 +11,18 @@ * Jianhua Li */ +#include +#include +#include +#include +#include +#include +#include #include #include -#include - -#include #include -#include -#include #include -#include -#include -#include +#include #include "hibmc_drm_drv.h" #include "hibmc_drm_regs.h" @@ -267,7 +267,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