From patchwork Thu Oct 18 20:48:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mamta Shukla X-Patchwork-Id: 10648411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 298E713B0 for ; Thu, 18 Oct 2018 23:10:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 158CF28D0E for ; Thu, 18 Oct 2018 23:10:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08E8F28D13; Thu, 18 Oct 2018 23:10:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE1B128D0E for ; Thu, 18 Oct 2018 23:10:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58D6E6E13B; Thu, 18 Oct 2018 23:10:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC7EF6E102 for ; Thu, 18 Oct 2018 20:49:00 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id r9-v6so14740503pgv.6 for ; Thu, 18 Oct 2018 13:49:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=kI/gHUdmZoArj4TyN7mi/I6T/IzlDGCg5fJv9PO7kHQ=; b=VPaQg8Iirogmwz5GK3fRcrjKY2zONj8G5fljfIgu5wfposEhSklV+RrhEZx69YxgTj Vte3/FlHoH0W+vpW9ggnIRzw9yPpqnuarxaN8G1XHs60H9tp897IraVNZ5W1mdKy2TOw 7w1PEzZtaPQzrryNEeeilTUgLbpLGxnngZa5UMyJGG0/DooILiMKzgJgaMkFVX+qV/F1 MyYXiUHNP5hVi5bTBzFfMgZjyzG7SqoSfE8Lesf8xEd7L6ji899/cZ3lPqFdT/OZrQ3y YxKPVpIOibxpuHOD3wQ5NUUpH0ZSa/9JYFSxNTDEyrFqabqO4uxGotyAKlINwI9XnrHB QgNw== X-Gm-Message-State: ABuFfoh/LD1eVhP881USBBmnREzc4EYjyjof1eIXCNJUms5i7aBUrgZx 3C03re+qyjvqX6cPuKIEdE0= X-Google-Smtp-Source: ACcGV611RumNBIq3RKGp3RcRphtfRwQ1LzTuElNw+C4oQpiTuXc7Cvh+mgvAgTt73Rg+4Nl5HLAR8Q== X-Received: by 2002:a63:ff46:: with SMTP id s6-v6mr29822741pgk.241.1539895740397; Thu, 18 Oct 2018 13:49:00 -0700 (PDT) Received: from armorer ([117.199.49.212]) by smtp.gmail.com with ESMTPSA id v26-v6sm21475205pfg.43.2018.10.18.13.48.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 13:48:59 -0700 (PDT) Date: Fri, 19 Oct 2018 02:18:15 +0530 From: Mamta Shukla To: outreachy-kernel@googlegroups.com Subject: [PATCH DRM] drm: msm: adreno: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) +PTR_ERR Message-ID: <20181018204815.GA23390@armorer> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Thu, 18 Oct 2018 23:10:26 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR because its better to have inlined function rather than code-opened implementation. Signed-off-by: Mamta Shukla Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index 6a68493..b751b76 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -1222,10 +1222,7 @@ static int a5xx_crashdumper_init(struct msm_gpu *gpu, SZ_1M, MSM_BO_UNCACHED, gpu->aspace, &dumper->bo, &dumper->iova); - if (IS_ERR(dumper->ptr)) - return PTR_ERR(dumper->ptr); - - return 0; + return PTR_ERR_OR_ZERO(dumper->ptr); } static void a5xx_crashdumper_free(struct msm_gpu *gpu,