Re: [PATCH mfd-n 1/2] ptp: clockmatrix: support 32-bit address space
From: Jakub Kicinski
Date: Mon Mar 27 2023 - 13:37:24 EST
On Mon, 27 Mar 2023 14:54:41 +0000 Min Li wrote:
> > On Thu, 23 Mar 2023 12:15:17 -0400 Min Li wrote:
> > > - err = idtcm_write(idtcm, 0, HW_Q8_CTRL_SPARE,
> > > + err = idtcm_write(idtcm, HW_Q8_CTRL_SPARE, 0,
> > > &temp, sizeof(temp));
> >
> > The flipping of the arguments should also be a separate patch.
>
> Hi Jakub
>
> If I separate this change, the other patch would be broken since it changed
> HW_Q8_CTRL_SPARE from a u16 value to u32 and it doesn't fit the function's
> particular parameter anymore
Both arguments are u16 now, so nothing can overflow until you change
the addresses to be u32.
patch 1 - reorder the arguments
patch 2 - bump the types to u32
patch 3 - change the addresses