Re: [PATCH v3 07/15] media: i2c: ds90ub960: Add support for I2C_RX_ID

From: Tomi Valkeinen
Date: Fri Dec 06 2024 - 02:25:09 EST


On 05/12/2024 21:36, Andy Shevchenko wrote:
On Thu, Dec 05, 2024 at 03:59:58PM +0200, Tomi Valkeinen wrote:
On 05/12/2024 10:31, Andy Shevchenko wrote:
On Wed, Dec 04, 2024 at 01:05:21PM +0200, Tomi Valkeinen wrote:

...

#define MHZ(v) ((u32)((v) * 1000000U))

Missed HZ_PER_MHZ from previous patch?

Yes, and no. I did leave the MHZ uses on purpose. I think the use of
HZ_PER_MHZ was fine in the calculations, but when having table-ish use of
MHZ, with hardcoded numbers, I found the MHZ() macro much nicer to read:

case MHZ(1200):

vs.
case 1200 * HZ_PER_MHZ:

Had I talked about tables? :-)
I was only commented the calculations.

I see your point now =)

Tomi