Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E92C2D0A3 for ; Thu, 29 Oct 2020 20:15:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E3AE420720 for ; Thu, 29 Oct 2020 20:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726431AbgJ2UP6 (ORCPT ); Thu, 29 Oct 2020 16:15:58 -0400 Received: from mga05.intel.com ([192.55.52.43]:30164 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbgJ2UP5 (ORCPT ); Thu, 29 Oct 2020 16:15:57 -0400 IronPort-SDR: 7CzOlBksGdLgrkpY+p/IbsbL7JyV9GgkmMNq6vRTrBsees/oW2iVHaKFlGpKIxkfF0GVnuIYUM uGvLEmm+Pprw== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="253211674" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="253211674" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:15:57 -0700 IronPort-SDR: 5rwPAQmFu/tcMt34v9+hKKc8LaC9nTkj9uTIQdHTdIIVH7inkJx7j5fDM1jWpntjlPWwULerth eNcQ7ox/TqvA== X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="319084089" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:15:55 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kYELx-001UeA-Cf; Thu, 29 Oct 2020 22:16:57 +0200 Date: Thu, 29 Oct 2020 22:16:57 +0200 From: Andy Shevchenko To: Bingbu Cao Cc: Yong Zhi , Sakari Ailus , Bingbu Cao , linux-media@vger.kernel.org, Tianshu Qiu , Mauro Carvalho Chehab Subject: Re: [PATCH v1] media: ipu3-cio2: Use macros from mm.h Message-ID: <20201029201657.GE4077@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Wed, Oct 28, 2020 at 04:11:05PM +0800, Bingbu Cao wrote: > Andy, thanks for your patch. > Reviewed-by: Bingbu Cao Thanks! > On 10/28/20 2:14 AM, Andy Shevchenko wrote: > > - entry[1].second_entry.last_page_available_bytes = > > - (remaining & ~PAGE_MASK) ? > > - (remaining & ~PAGE_MASK) - 1 : PAGE_SIZE - 1; > > + remaining = offset_in_page(remaining); > > + entry[1].second_entry.last_page_available_bytes = (remaining ?: PAGE_SIZE) - 1; > > Not really about this change, is there some coding style update? This line obviously over 80 > chars, but the latest script did not report warning. There is a relaxation in the script, but now it's ambiguous with the documentation. I just realized I can rewrite this as: remaining = offset_in_page(remaining) ?: PAGE_SIZE; entry[1].second_entry.last_page_available_bytes = remaining - 1; Would it work for you? > > /* Fill FBPT */ > > remaining = length; > > i = 0; -- With Best Regards, Andy Shevchenko