Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4252006rwb; Mon, 31 Jul 2023 04:13:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEWuOGBBIRt9ocZazuF8TWoiadv+2zoxTGHeSHFvVxEfGrHM+VucjHCzjiUtFzb8u6+CgxU X-Received: by 2002:a17:902:dad2:b0:1b9:e9f1:91e0 with SMTP id q18-20020a170902dad200b001b9e9f191e0mr9413581plx.41.1690802037612; Mon, 31 Jul 2023 04:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690802037; cv=none; d=google.com; s=arc-20160816; b=r3Uw6L7B4zimvqGX1AABynTtMNZrDxsA+NhwUuGdZpSfHJ8RZ3D17ck9D1jUmZawOC VIMEFUxpNZQssuzOCYKfMEMO7fJHsfPkmRf1qG9QB++oy5u3rpZ0jQ124Nk+EXD0U4rd NmVRjO4Eyh5H18n8/OJ43wJvFTAJBQo4he+J3osO3QhVPKvh1zsNoCyeryOljrV/aw4D nTFWRb0Eu06nDbgJLhDpFFC+pOkA7bOmQF2mPNXjLWYIZY6kFJTh+3D5tcCPmEiHVS6y WEp6QkzYi4gHtaZTGlwtU6IEbg6xkUTbuXMCjFaohl0YL0++2CZseQXXOlw6pca4/yU9 Hp/Q== 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=x1JGyEqX1D8xKPYvBhvfoHBivlNsfhoBd/APQiMtHCc=; fh=ogpz42u0FSHjmbsA7avsy96eMi0qCoHLpp+Ju7oVTGQ=; b=rBK+Wy+ocL2Aq3zcTsn0R03DO2oqvAVur8Zi9DF+fXlJXUjoh9Vl/xTXyw54WLA0X9 Uh07l/Hw2cNIBVIUW67rrLaAh4HyxD9xJrOTSVmeqi2QV2zPm7p9G+P+Ruec0hQ0QPSZ PH4ruHM1nMAqLp+LoKaA5K62ss0CrpJUV2aN8HJSXPtrkExoygEw7kVtWA6Rd2pDphh/ LrSKie0IUZFHVDzai/2VXrjLs9puxuApJCUT9tdNKYXw3bDVI2Zu/19fReV2NpvRriac Tw/4JUd4JzzbqsAXmeRV8/tWh+zznC+PSZIS3UIQdmvL8bCM+JbI0a+4nJxgMWiMEJx6 t4Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ASn3gYEo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a1709026f1000b001b88cae209esi6842085plk.250.2023.07.31.04.13.43; Mon, 31 Jul 2023 04:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ASn3gYEo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbjGaK3i (ORCPT + 99 others); Mon, 31 Jul 2023 06:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjGaK3h (ORCPT ); Mon, 31 Jul 2023 06:29:37 -0400 Received: from mgamail.intel.com (unknown [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC90EE; Mon, 31 Jul 2023 03:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690799376; x=1722335376; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=qrcUzGPc/mzEUo4ZLeC0gsRlzVMa/7ucsgNmiIe/YQQ=; b=ASn3gYEoYid8C1rUZnVmPZ6Sg+L0LHjpj1KyTTDvLQaz+pjRaFBKTYQm irTyZj2b5b3CiWHIdsAlW+7NYs45QOpufZRuRlOXHuzQJk/ztg8TdURav smKhj9cBBeaTqLmrWfppeqW2FpuJoYTkuVVKZqFJw4tTONGgXuFX3lVBF 2t+ZI0sX7PtBRfMH6+EdKlzl40SyZMa64ygkcNqg72OAdOSw9j67HrjPx zie3FN08uC88kT+DUMVfFTEImx4QMzdlX3qQf7LG/kZ97Ay0CxI6qEh8V Vw5aMznR+/ErfEKHa+D2flgfOy1hMSJ23cA1MusI1qpL5l0pRkU0351cA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10787"; a="455353616" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="455353616" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 03:29:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10787"; a="818294474" X-IronPort-AV: E=Sophos;i="6.01,244,1684825200"; d="scan'208";a="818294474" Received: from naikshri-mobl7.ger.corp.intel.com (HELO localhost) ([10.252.36.230]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 03:29:29 -0700 From: Jani Nikula To: Andy Shevchenko , Imre Deak , Andy Shevchenko , Jiri Slaby , Greg Kroah-Hartman , Ilpo =?utf-8?Q?J=C3=A4rv?= =?utf-8?Q?inen?= , Alexey Dobriyan , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Philipp Zabel , Helge Deller , Stephen Boyd , Nikita Shubin , Nikita Shubin via B4 Relay , Andi Shyti Subject: Re: [PATCH v3 1/1] drm/i915: Move abs_diff() to math.h In-Reply-To: <20230724082511.3225-1-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230724082511.3225-1-andriy.shevchenko@linux.intel.com> Date: Mon, 31 Jul 2023 13:29:26 +0300 Message-ID: <87ila0xtkp.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 24 Jul 2023, Andy Shevchenko wrote: > abs_diff() belongs to math.h. Move it there. > This will allow others to use it. > > Signed-off-by: Andy Shevchenko > Reviewed-by: Jiri Slaby # tty/serial > --- > v3: added tag (Jiri), removed space after a cast (fdo CI) > drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 1 + > drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 7 ------- Acked-by: Jani Nikula for merging the i915 parts via whichever tree is most convenient for you. > drivers/gpu/ipu-v3/ipu-image-convert.c | 15 +++++++-------- > drivers/tty/serial/omap-serial.c | 7 +------ > drivers/video/fbdev/core/svgalib.c | 7 +------ > include/linux/math.h | 7 +++++++ > 6 files changed, 17 insertions(+), 27 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c > index 6b2d8a1e2aa9..290e856fe9e9 100644 > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c > @@ -21,6 +21,7 @@ > * DEALINGS IN THE SOFTWARE. > */ > > +#include > #include > > #include "i915_reg.h" > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h > index ba62eb5d7c51..04e6810954b2 100644 > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h > @@ -29,13 +29,6 @@ > > #include "intel_wakeref.h" > > -/*FIXME: Move this to a more appropriate place. */ > -#define abs_diff(a, b) ({ \ > - typeof(a) __a = (a); \ > - typeof(b) __b = (b); \ > - (void) (&__a == &__b); \ > - __a > __b ? (__a - __b) : (__b - __a); }) > - > enum tc_port; > struct drm_i915_private; > struct intel_atomic_state; > diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c > index af1612044eef..841316582ea9 100644 > --- a/drivers/gpu/ipu-v3/ipu-image-convert.c > +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c > @@ -7,7 +7,10 @@ > > #include > #include > +#include > + > #include