[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200320090826.GE4344@pflmari>
Date: Fri, 20 Mar 2020 10:08:26 +0100
From: Alex Riesen <alexander.riesen@...itec.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
CC: Kieran Bingham <kieran.bingham@...asonboard.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Hans Verkuil" <hverkuil-cisco@...all.nl>,
Rob Herring <robh+dt@...nel.org>,
"Mark Rutland" <mark.rutland@....com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
<devel@...verdev.osuosl.org>, <linux-media@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH v2 03/10] media: adv748x: reduce amount of code for
bitwise modifications of device registers
Laurent Pinchart, Thu, Mar 19, 2020 19:06:14 +0100:
> On Thu, Mar 19, 2020 at 06:41:53PM +0100, Alex Riesen wrote:
> > #define io_read(s, r) adv748x_read(s, ADV748X_PAGE_IO, r)
> > #define io_write(s, r, v) adv748x_write(s, ADV748X_PAGE_IO, r, v)
> > -#define io_clrset(s, r, m, v) io_write(s, r, (io_read(s, r) & ~(m)) | (v))
> > +#define io_clrset(s, r, m, v) adv748x_update_bits(s, ADV748X_PAGE_IO, r, m, v)
> > +#define io_update(s, r, m, v) adv748x_update_bits(s, ADV748X_PAGE_IO, r, m, v)
>
> Those two are identical. Do we need both ? I would standardize on either
> *_update or *_clrset for all the functions here. Apart from that,
Shame on me. *_clrset that is (it was there before me).
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Thanks!
Regards,
Alex
Powered by blists - more mailing lists