Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2985362pxa; Tue, 25 Aug 2020 08:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM+f62QD8gXgAwhkbm+HYmYm1K4QMf69Rp4vGaGqC8eGwUR5GwGUSkwPCEaAa1mKwUB9Qo X-Received: by 2002:a17:906:6d91:: with SMTP id h17mr10528769ejt.531.1598369180055; Tue, 25 Aug 2020 08:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598369180; cv=none; d=google.com; s=arc-20160816; b=DftCWMOHsXmeAWegyLTaqHaxMuk5z+3kmjtUOFPQ8LSXX5BmxFETFi6vGtkKRhS7zP J/mWOvF//8nI/9c6euC3jc5vAfio8XiyH60WCrGM58CqgUSQDJKKzl96w5cGGubTRJ/A hlJWsiAgr9uznMvUp4MG4/jzofR2+snoge3hCyxpkttDwPITJ88/wdA0dZPvWkvdtnCB 1YZ/ifWUsOhG7OCqu7iJXJbPfRA0bW6IvrIIp1PDY++rN2RmiuF0oaeRXW5MBnGPL8mA 9flzFphUysXvx/gdpaNYKJFXqvJWdYWCzdpm/ah1ipUSVY6v4mt4wQtptkBBsFWBE1cN VO0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=UbQCbYvMquJItHhIOrpdxvmaU+fnaaEiBJeqKVHXy50=; b=FPFGXd2RHVyAsjel4XJSxKVdLf8CJrLMypKO29Y8qaUrcGzzWY4gA/o7O6H1LJSuZa meEUCCqGP4yV+TkOhPdyw1tOBWPWQO6NqOO2UVWRaBTQHR/3vbCYf7sy87DSRFEd/SW9 2mh4mrvzmR70gA3WWM8TI9QMVYrs02ZoBxOUJEHhB/1653SDRgEKicEh92DmlE0RLV0b eSYpul8j+B8oL5Y75cYKItaSVDH/Is15UrPEh26fAc8POjMK01RHn5KqGp46UQ3s5vy8 wYt9x5p9VuYPMeLALJRVD0fQyw+znVYMJYlDfhwHDRepal0krKC/DInEmjBeEOJEyQdJ ZHWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di21si3197375edb.382.2020.08.25.08.25.57; Tue, 25 Aug 2020 08:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbgHYPX1 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Aug 2020 11:23:27 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:49165 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbgHYPXR (ORCPT ); Tue, 25 Aug 2020 11:23:17 -0400 X-Originating-IP: 90.89.180.255 Received: from lhopital-XPS-13-9360 (lfbn-tou-1-1372-bdcst.w90-89.abo.wanadoo.fr [90.89.180.255]) (Authenticated sender: kevin.lhopital@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 7DB231BF225; Tue, 25 Aug 2020 15:23:10 +0000 (UTC) Date: Tue, 25 Aug 2020 17:23:09 +0200 From: =?UTF-8?B?S8OpdmluIEwnaMO0cGl0YWw=?= To: Maxime Ripard Cc: linux-media@vger.kernel.org, mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, yong.deng@magewell.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, paul.kocialkowski@bootlin.com, thomas.petazzoni@bootlin.com Subject: Re: [PATCH 1/7] media: sun6i-csi: Fix the bpp for 10-bit bayer formats Message-ID: <20200825172309.6756760d@lhopital-XPS-13-9360> In-Reply-To: <20200824165536.u2yzonoskiqu3c5j@gilmour.lan> References: <20200821145935.20346-1-kevin.lhopital@bootlin.com> <20200821145935.20346-2-kevin.lhopital@bootlin.com> <20200824165536.u2yzonoskiqu3c5j@gilmour.lan> Organization: bootlin X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Le Mon, 24 Aug 2020 18:55:36 +0200, Maxime Ripard a écrit : > On Fri, Aug 21, 2020 at 04:59:29PM +0200, Kévin L'hôpital wrote: > > 10-bit bayer formats are aligned to 16 bits in memory, so this is > > what needs to be used as bpp for calculating the size of the > > buffers to allocate. > > > > Signed-off-by: Kévin L'hôpital > > Generally speaking, you should also explain why it's not an issue for > the callers. Depending on what that function is supposed to be doing > (returning the padded bits or the padded bits per pixel), your patch > could be either right or wrong. > > Since all the callers are using it to generate the number of bytes per > line, your patch is indeed correct. But it should be mentionned in the > commit log. > > Maxime All right, I will add this explanation. Thank you very much for the review Kévin -- Kevin L'Hopital, Bootlin Embedded Linux and kernel engineering https://bootlin.com