Re: [PATCH 4/4] bd79703: Support ROHM BD7971x DACs

From: Andy Shevchenko

Date: Fri Dec 04 2026 - 04:39:34 EST


On Fri, Dec 04, 2026 at 07:58:30AM +0200, Matti Vaittinen wrote:
> On 03/12/2026 19:09, Andy Shevchenko wrote:
> > On Wed, Dec 02, 2026 at 03:39:21PM +0200, Matti Vaittinen wrote:

...

> > > + unsigned int tmp = val;
> >
> > This signed->unsigned trick begs for a comment. It's quite easy to miss and
> > someone might introduce some issues due to that.
>
> I was a bit unsure whether to do this or not. With the data-sizes these DACs
> use, this assignment shouldn't really be needed. Still, leaving shifting to
> be done with signed int felt a bit error prone, in case things change. If
> you agree the assignment to unsigned makes sense, then I suppose adding a
> comment is good idea.

Yes, I agree.

--
With Best Regards,
Andy Shevchenko