Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2883254pxa; Mon, 17 Aug 2020 23:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBtQhfJsHvIjP0z8y62/luXJIHLf1XULKtQNfmlioXdkSs9KnzhY7o2dbI1TeSwNLs0uN+ X-Received: by 2002:aa7:c40f:: with SMTP id j15mr19278433edq.64.1597733826990; Mon, 17 Aug 2020 23:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597733826; cv=none; d=google.com; s=arc-20160816; b=SLQTyxcAFb2CKWTZ8btqDfX7zuVyOn+/qvF7y0Zc8UBGOefz/NtfOrycDxhmkJmaKZ eg4F0vviOiu0MgBqHyoMcPYpKDvGebzZqD3zBzTnDmlRP0IdsQTgFpxGhwnlU+QdCrQk z2x7lNeGZN6rLu3xCJq8QuNVsSPJmJpDbzgaTIQHJwGqMr/ZTBMsUt2KfCsI+DyPoJmx QlBkQxjHibKUK6GbWt242B4wZz5dn2pDKoeQpIi7kU7kTDe86FWlXjgIr5buSwFSwA9A vdSZBUk2T8lm1hCH3E/7CBbCdqcxNe56WA2fwyiwVMUGm2mupievh8wEAq7z7c2N11dx QQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=X6ZKSOvZ2HKJH1ff7TXKfAbn9VVtmm0rT717pTIGD8s=; b=Z+CKfAYVMUvjKihXnX8/eenWlHLvv2QH9n8pNQ85hdQ5FbOiDPFLLU8aQSAZCpm9Zd yLNh42mS4IGbXQgHwr8M9nI4phac0kFbseI59TXhzaZezkZTEtKh+bVlbujPgGQIq6Y6 Hra8TgPHXEb6v/a00jnFyaNbvCWHvXKAo9jlJvZNmyfnpbEViGCeIsP8VtW5MO5w+NEu bdwgk6B6uSyJEhbI7ZtoW4ivTR7ZhrDi/tMs0NQENSEB+EN09LB6DA8RXWN1pInx1Yw1 mVBInum/8+Z/vfrqLFvxqRKuee+87+m/qiLXBpbkl2ZrPnEuidFLHA3LZAeU7829xd3z 1n/Q== 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 dn20si17373138ejc.104.2020.08.17.23.56.43; Mon, 17 Aug 2020 23:57:06 -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 S1726652AbgHRGyF (ORCPT + 99 others); Tue, 18 Aug 2020 02:54:05 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9830 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726365AbgHRGyC (ORCPT ); Tue, 18 Aug 2020 02:54:02 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3459C9DC0F06518D6A40; Tue, 18 Aug 2020 14:53:56 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 18 Aug 2020 14:53:50 +0800 From: Tian Tao To: , , , , , , , , CC: Subject: [PATCH drm/hisilicon 4/4] drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_drv Date: Tue, 18 Aug 2020 14:51:44 +0800 Message-ID: <1597733504-30812-5-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597733504-30812-1-git-send-email-tiantao6@hisilicon.com> References: <1597733504-30812-1-git-send-email-tiantao6@hisilicon.com> 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 Use drv_err instead of DRM_ERROR in hibmc_drm_drv Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 2b4f821..e3ffa1f 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -98,13 +98,13 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv) ret = hibmc_de_init(priv); if (ret) { - DRM_ERROR("failed to init de: %d\n", ret); + drm_err(priv->dev, "failed to init de: %d\n", ret); return ret; } ret = hibmc_vdac_init(priv); if (ret) { - DRM_ERROR("failed to init vdac: %d\n", ret); + drm_err(priv->dev, "failed to init vdac: %d\n", ret); return ret; } @@ -212,7 +212,7 @@ static int hibmc_hw_map(struct hibmc_drm_private *priv) iosize = pci_resource_len(pdev, 1); priv->mmio = devm_ioremap(dev->dev, ioaddr, iosize); if (!priv->mmio) { - DRM_ERROR("Cannot map mmio region\n"); + drm_err(dev, "Cannot map mmio region\n"); return -ENOMEM; } @@ -220,7 +220,7 @@ static int hibmc_hw_map(struct hibmc_drm_private *priv) size = pci_resource_len(pdev, 0); priv->fb_map = devm_ioremap(dev->dev, addr, size); if (!priv->fb_map) { - DRM_ERROR("Cannot map framebuffer\n"); + drm_err(dev, "Cannot map framebuffer\n"); return -ENOMEM; } priv->fb_base = addr; @@ -265,7 +265,7 @@ static int hibmc_load(struct drm_device *dev) priv = drmm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) { - DRM_ERROR("no memory to allocate for hibmc_drm_private\n"); + drm_err(dev, "no memory to allocate for hibmc_drm_private\n"); return -ENOMEM; } dev->dev_private = priv; @@ -285,17 +285,17 @@ static int hibmc_load(struct drm_device *dev) ret = drm_vblank_init(dev, dev->mode_config.num_crtc); if (ret) { - DRM_ERROR("failed to initialize vblank: %d\n", ret); + drm_err(dev, "failed to initialize vblank: %d\n", ret); goto err; } ret = pci_enable_msi(dev->pdev); if (ret) { - DRM_WARN("enabling MSI failed: %d\n", ret); + drm_warn(dev, "enabling MSI failed: %d\n", ret); } else { ret = drm_irq_install(dev, dev->pdev->irq); if (ret) - DRM_WARN("install irq failed: %d\n", ret); + drm_warn(dev, "install irq failed: %d\n", ret); } /* reset all the states of crtc/plane/encoder/connector */ @@ -322,7 +322,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev, dev = drm_dev_alloc(&hibmc_driver, &pdev->dev); if (IS_ERR(dev)) { - DRM_ERROR("failed to allocate drm_device\n"); + drm_err(dev, "failed to allocate drm_device\n"); return PTR_ERR(dev); } @@ -331,19 +331,19 @@ static int hibmc_pci_probe(struct pci_dev *pdev, ret = pci_enable_device(pdev); if (ret) { - DRM_ERROR("failed to enable pci device: %d\n", ret); + drm_err(dev, "failed to enable pci device: %d\n", ret); goto err_free; } ret = hibmc_load(dev); if (ret) { - DRM_ERROR("failed to load hibmc: %d\n", ret); + drm_err(dev, "failed to load hibmc: %d\n", ret); goto err_disable; } ret = drm_dev_register(dev, 0); if (ret) { - DRM_ERROR("failed to register drv for userspace access: %d\n", + drm_err(dev, "failed to register drv for userspace access: %d\n", ret); goto err_unload; } -- 2.7.4