From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 CBCC920E026 for ; Mon, 21 Apr 2025 21:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745269623; cv=none; b=aEw7MehEUtdPC3toOtLuYHXFrnvc6jlINcEmXKFa+fVJa7YV7HXJhAPYAnLnGdw7Q5S2cuWYvgZ69YyL292OIOR/GKIKA+3/YmF85nW3TJVzjBCcD/RNB/KSyNICDlD65DynIOnR2nWY2dYHGC29QB8AYzfBAIF9yRudr89E7WE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745269623; c=relaxed/simple; bh=zZ9QfTcAgGyVYVMs/hFgm2shARK8oqJFBREnc4yd/O8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DDj38dDRJfz1fpyktnalJcZ3hBrnQqOPBpb+SNkTmo2ZDSTViZXd/Rs+lv56KkzaQUdj9yNqSXV9WtbuUgqyHGIWEX7Y8G58wF3kiIJLa895DV/Rj/yPo1RjtTLjzQ40sx0Pu/1dhtSli8nWt5pDjeBJmP7KKsc/wH4NvVO8kpM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=bzYJdNJg; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="bzYJdNJg" Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C7B066D6; Mon, 21 Apr 2025 23:04:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745269492; bh=zZ9QfTcAgGyVYVMs/hFgm2shARK8oqJFBREnc4yd/O8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bzYJdNJg/LuvQBr4OL4eciqJS2M7kpo4FXjah87Kf7KRD64nt+dZ34NKjUjp0i/c/ RNz9SWLBw/TuFNcM9G+FcaTDoV5dyQNmdsvlTrT9YqCbNRuI0udA42xi88w5Dt08vj 09s2rEjqY68jvRrSv4nHsMH/oVeQWNkPySkyIrfo= Date: Tue, 22 Apr 2025 00:06:55 +0300 From: Laurent Pinchart To: Frank Li Cc: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , linux-media@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Chiras , "Guoniu.zhou" Subject: Re: [PATCH v4 03/13] media: nxp: imx8-isi: Remove unused offset in mxc_isi_reg and use BIT() macro for mask Message-ID: <20250421210655.GM17813@pendragon.ideasonboard.com> References: <20250408-8qxp_camera-v4-0-ef695f1b47c4@nxp.com> <20250408-8qxp_camera-v4-3-ef695f1b47c4@nxp.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20250408-8qxp_camera-v4-3-ef695f1b47c4@nxp.com> Hi Frank, Thank you for the patch. On Tue, Apr 08, 2025 at 05:53:01PM -0400, Frank Li wrote: > Preserve clarity by removing the unused 'offset' field in struct mxc_isi_reg, > as it duplicates information already indicated by the mask and remains unused. The commit message line length limit is normally 72 characters. I can reflow when applying if no other change to the series is needed. > > Improve readability by replacing hex value masks with the BIT() macro. > > No functional change. > > Signed-off-by: Frank Li Reviewed-by: Laurent Pinchart > --- > .../media/platform/nxp/imx8-isi/imx8-isi-core.c | 25 +++++++++++----------- > .../media/platform/nxp/imx8-isi/imx8-isi-core.h | 1 - > 2 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > index 1e79b1211b603..ecfc95882f903 100644 > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > @@ -3,6 +3,7 @@ > * Copyright 2019-2020 NXP > */ > > +#include > #include > #include > #include > @@ -247,24 +248,24 @@ static void mxc_isi_v4l2_cleanup(struct mxc_isi_dev *isi) > > /* For i.MX8QXP C0 and i.MX8MN ISI IER version */ > static const struct mxc_isi_ier_reg mxc_imx8_isi_ier_v1 = { > - .oflw_y_buf_en = { .offset = 19, .mask = 0x80000 }, > - .oflw_u_buf_en = { .offset = 21, .mask = 0x200000 }, > - .oflw_v_buf_en = { .offset = 23, .mask = 0x800000 }, > + .oflw_y_buf_en = { .mask = BIT(19) }, > + .oflw_u_buf_en = { .mask = BIT(21) }, > + .oflw_v_buf_en = { .mask = BIT(23) }, > > - .panic_y_buf_en = {.offset = 20, .mask = 0x100000 }, > - .panic_u_buf_en = {.offset = 22, .mask = 0x400000 }, > - .panic_v_buf_en = {.offset = 24, .mask = 0x1000000 }, > + .panic_y_buf_en = { .mask = BIT(20) }, > + .panic_u_buf_en = { .mask = BIT(22) }, > + .panic_v_buf_en = { .mask = BIT(24) }, > }; > > /* For i.MX8MP ISI IER version */ > static const struct mxc_isi_ier_reg mxc_imx8_isi_ier_v2 = { > - .oflw_y_buf_en = { .offset = 18, .mask = 0x40000 }, > - .oflw_u_buf_en = { .offset = 20, .mask = 0x100000 }, > - .oflw_v_buf_en = { .offset = 22, .mask = 0x400000 }, > + .oflw_y_buf_en = { .mask = BIT(18) }, > + .oflw_u_buf_en = { .mask = BIT(20) }, > + .oflw_v_buf_en = { .mask = BIT(22) }, > > - .panic_y_buf_en = {.offset = 19, .mask = 0x80000 }, > - .panic_u_buf_en = {.offset = 21, .mask = 0x200000 }, > - .panic_v_buf_en = {.offset = 23, .mask = 0x800000 }, > + .panic_y_buf_en = { .mask = BIT(19) }, > + .panic_u_buf_en = { .mask = BIT(21) }, > + .panic_v_buf_en = { .mask = BIT(23) }, > }; > > /* Panic will assert when the buffers are 50% full */ > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h > index 9c7fe9e5f941f..e7534a80af7b4 100644 > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h > @@ -114,7 +114,6 @@ struct mxc_isi_buffer { > }; > > struct mxc_isi_reg { > - u32 offset; > u32 mask; > }; > -- Regards, Laurent Pinchart