Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp561442lqo; Fri, 10 May 2024 08:04:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUTYAQGQW6MBVupbq41k674M0ew/lfwqGy2TtS4uJqXFURZwMWTB9fAti3OxV5z329wvv1e3e4EiSBZBMQJ/6MwTu1EzDL3TF2SuDunng== X-Google-Smtp-Source: AGHT+IG2gWBMGlFt55puvrImZolDCopBGvTCXdSN1IyWnH2N0vCHMqNvRn0sjIh/D6L3tFbl5IPv X-Received: by 2002:a50:fb08:0:b0:573:5c17:f6f2 with SMTP id 4fb4d7f45d1cf-5735c17f781mr674958a12.24.1715353453924; Fri, 10 May 2024 08:04:13 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c32d7a5si2206518a12.471.2024.05.10.08.04.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 08:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=WHQffnzF; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-175927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A80491F22F7C for ; Fri, 10 May 2024 15:04:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEE81171646; Fri, 10 May 2024 15:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WHQffnzF" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B74D12C53F; Fri, 10 May 2024 15:04:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715353445; cv=none; b=MCIz0cZEVSrWmg1jOeAUxkJQwOYo89u+Z7jYseo+OTDNOx78BJVJtM26t8v0wqEg1aRx4uMrikh7wNVaxyog3iv3wIqp7wa3Hb+mELA1icSEpfyKDJcVNO02oH3t6U8NiPvHOVaRsyLYE004j6bCycP4z/gNSRPM/TRlLioUZFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715353445; c=relaxed/simple; bh=DfIwLOulQLcLembSLllTkooRPlHt5xY4HjiqBcwUzpw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n2G4W3SFcIYMfqJ1S4Y3ZtklmbRdD+Du5LO7UjnPR7d3MHaa9pB2HV3QsAtOaIzmuPkZRUZB5QaC4aW5tgI0lJfWouWBKE5Ok75oXgwb6qAXRiKf8WfaFYG+15GVRwpU9SIWA5Txg/NSFSNbmEgtIeLVgHzpuw114U2pFIJ1EQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WHQffnzF; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715353444; x=1746889444; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DfIwLOulQLcLembSLllTkooRPlHt5xY4HjiqBcwUzpw=; b=WHQffnzFzpDRRgk8AJLgcCgfRIr2pXQ1GuwkCDuI3vX2FAWpPzx+z3PR Nm/hp96kMgmq9Gjyzb6Ti0wyvTafru9H6+rpgq/4UQ6FxRgRIKS5Hw0Y1 ihiZ2GI+2oD5l8IdxGwDSslapIDZ7EqQbZ/kqROO/fOWRQLHiAKXNSrYn qN6yAbT4Xe/i8yP3h/1Jo9Zy/FAb+/wUXtEXoIah1V1t3BCuRRCcObtEG pjifHQJCUcwpulsU0vygI4huPzjPecF3V3UCp5dG/JiCvPZYHS2d563tv 0QTr6Hn4QxwR5gwEds+0hj+kRbG4hjpJ5WiyZr6MXlkgnkB5p7hzsyfky w==; X-CSE-ConnectionGUID: L2Y5qE9RTfKQwfzxXL2hhg== X-CSE-MsgGUID: YBJF/5J6Swq1RSsX1YtqgA== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="11200621" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="11200621" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 08:04:03 -0700 X-CSE-ConnectionGUID: GHZdCY6/TtajG/italIwTA== X-CSE-MsgGUID: 7K0z7nQkRdS4ezJTcxrYqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="29489293" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa010.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 08:03:57 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1s5Rmq-000000068aS-1p1l; Fri, 10 May 2024 18:03:52 +0300 Date: Fri, 10 May 2024 18:03:52 +0300 From: Andy Shevchenko To: Devarsh Thakkar Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, benjamin.gaignard@collabora.com, sebastian.fricke@collabora.com, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, praneeth@ti.com, nm@ti.com, vigneshr@ti.com, a-bhatia1@ti.com, j-luthra@ti.com, b-brnich@ti.com, detheridge@ti.com, p-mantena@ti.com, vijayp@ti.com, andrzej.p@collabora.com, nicolas@ndufresne.ca, akpm@linux-foundation.org, gregkh@linuxfoundation.org, adobriyan@gmail.com, jani.nikula@intel.com Subject: Re: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple Message-ID: References: <20240509184010.4065359-1-devarsht@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240509184010.4065359-1-devarsht@ti.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, May 10, 2024 at 12:10:10AM +0530, Devarsh Thakkar wrote: > Use generic macro round_closest_up for rounding to nearest multiple instead round_closest_up() We refer to the functions as func(). > of using local function. .. > @@ -565,7 +563,7 @@ static void find_best_seam(struct ipu_image_convert_ctx *ctx, > * The closest input sample position that we could actually > * start the input tile at, 19.13 fixed point. > */ > - in_pos_aligned = round_closest(in_pos, 8192U * in_align); > + in_pos_aligned = round_closest_up(in_pos, 8192U * in_align); > /* Convert 19.13 fixed point to integer */ > in_pos_rounded = in_pos_aligned / 8192U; Oh, these seems to be better to use either ALIGN*(), or PFN_*() / PAGE_*() families of macros. What the semantic of 8192 is? -- With Best Regards, Andy Shevchenko