Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp173615iob; Mon, 2 May 2022 16:16:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa7eOAc2kT8KpvBVOhH6PoKRUTtBe50SxcDgT4OrAX4vWFWjfBzRfy/OHm29QxR38pWaw8 X-Received: by 2002:a17:902:f78d:b0:14f:ce61:eaf2 with SMTP id q13-20020a170902f78d00b0014fce61eaf2mr14004809pln.124.1651533377645; Mon, 02 May 2022 16:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651533377; cv=none; d=google.com; s=arc-20160816; b=ThsYDj3vrABcP5N4itqXj/EiK1IfzdLGGhtORaf7D1mG1L+bu94glHQnSvzyoKHrRN 9hpI9isH1zY0ouxNf/mASmPfQwSysssEesaTT3O4PbTGSrtneAljLJZIH8+CtcED2Ce5 I+qsv3yFJmHjt9d2SnARJEXb5xcrCcgD2KJ0+fOETYb0kJhZInnS/ZzOXtGiC0YY8RTo 6YmJ0phLpUUbjjoJdVeP/fcWhHHq5zLcpHPxHniMoJpMwWdOXX9Je6XnJqQpViCb/Ljo datB4uPXIAdzl9ljBjPZo/VadIwrPmBvnEcbr5GaTz1MwzQmfGFJKsrWw+BoogMXTL08 /caw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=aGIhjeWxREaUEAEZBO199w0yoYS8MGngl3RFYD6HNyU=; b=z8C+lquHgF9dOcASyBqkV/fS4We80DLxEC0yd8G2i1vghxnRdQliQuwyTi2THGMvLV cLjBRzL79UTLWTFPKRTqXjlc5WnqTUKKoVVZdYZeqYkvucVQsGrlXV04NuZXeRN8zNsC J/xKMkiXV+lQ3c8LVV7wEhXSxHTG2jEYsL8JRwD5CPmgLycSU3p2HwEYcPBEo0imaFdh 9KZzrx8rVFteSiVA6diCxd6zb0o4OjWWtaPdC1Iah0cPX1WLX9DjlFLyl/WZQozTtUrI gjStLpznmqjTZuj/VSDvQbFi7cPXXAWwtYXoGB41v6/giBybMb6gZkxsEnWzXRZ82GpA tygA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UC+FVwU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k4-20020a056a00168400b0050a7b4bf744si15691133pfc.128.2022.05.02.16.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:16:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UC+FVwU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9A0BC2BB34; Mon, 2 May 2022 16:16:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352025AbiEBIdo (ORCPT + 99 others); Mon, 2 May 2022 04:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238211AbiEBIdm (ORCPT ); Mon, 2 May 2022 04:33:42 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4507629F for ; Mon, 2 May 2022 01:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651480213; x=1683016213; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=/J8JbV8t2FS+lPPIOg2xi6/2iCk4fuaVr9xvS6LzXEo=; b=UC+FVwU6XSPw6KrMlorWW0dxA507XA3QKzpJhSjtDAphkOKXa5BFikWj 78twPGf1zfqsygxK1NvPRasYjSHdRapkTwv9Rk2DlGMuSpoau/s8/+NB7 iWEvJ++RI2PTyRtAp5cF61AVk0ExxOA1r+S9Uyj/zRTepKOPHBi0PWhWG NnILTsbji2mrSa0ruBuyviZgQmszeAKx8EMm+fdSMJwVfkvjwDM/jYfdI VCT4NbSYAeI1/NHcXIZShQlt9CAolDai+XyWxr4w4xbrKnh1LbXwNKiJD ycJfedPmH42wmu4PT8WppAnnEMq1JRN/EljRxDYpRU+PBMuj8ZMWHfr58 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10334"; a="267313760" X-IronPort-AV: E=Sophos;i="5.91,190,1647327600"; d="scan'208";a="267313760" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2022 01:30:12 -0700 X-IronPort-AV: E=Sophos;i="5.91,190,1647327600"; d="scan'208";a="583592217" Received: from wagoleb-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.155.30]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2022 01:30:09 -0700 From: Jani Nikula To: Kefeng Wang , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kefeng Wang Subject: Re: [PATCH] drm/i915: use IOMEM_ERR_PTR() directly In-Reply-To: <20220502034328.78486-1-wangkefeng.wang@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220502034328.78486-1-wangkefeng.wang@huawei.com> Date: Mon, 02 May 2022 11:30:06 +0300 Message-ID: <87h768s5f5.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 02 May 2022, Kefeng Wang wrote: > Use IOMEM_ERR_PTR() instead of self defined IO_ERR_PTR(). > > Signed-off-by: Kefeng Wang Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/i915_vma.c | 4 ++-- > drivers/gpu/drm/i915/i915_vma.h | 1 - > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c > index 94fcdb7bd21d..639605c89b7b 100644 > --- a/drivers/gpu/drm/i915/i915_vma.c > +++ b/drivers/gpu/drm/i915/i915_vma.c > @@ -541,7 +541,7 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma) > int err; > > if (WARN_ON_ONCE(vma->obj->flags & I915_BO_ALLOC_GPU_ONLY)) > - return IO_ERR_PTR(-EINVAL); > + return IOMEM_ERR_PTR(-EINVAL); > > if (!i915_gem_object_is_lmem(vma->obj)) { > if (GEM_WARN_ON(!i915_vma_is_map_and_fenceable(vma))) { > @@ -594,7 +594,7 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma) > err_unpin: > __i915_vma_unpin(vma); > err: > - return IO_ERR_PTR(err); > + return IOMEM_ERR_PTR(err); > } > > void i915_vma_flush_writes(struct i915_vma *vma) > diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h > index 67ae7341c7e0..8e74972fdca3 100644 > --- a/drivers/gpu/drm/i915/i915_vma.h > +++ b/drivers/gpu/drm/i915/i915_vma.h > @@ -331,7 +331,6 @@ static inline bool i915_node_color_differs(const struct drm_mm_node *node, > * Returns a valid iomapped pointer or ERR_PTR. > */ > void __iomem *i915_vma_pin_iomap(struct i915_vma *vma); > -#define IO_ERR_PTR(x) ((void __iomem *)ERR_PTR(x)) > > /** > * i915_vma_unpin_iomap - unpins the mapping returned from i915_vma_iomap -- Jani Nikula, Intel Open Source Graphics Center