Messages in this thread | | | Date | Tue, 8 Aug 2023 13:46:08 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] spi: dw: Set default value if reg-io-width isn't specified |
| |
On Tue, Aug 08, 2023 at 09:00:18AM +0900, Kunihiko Hayashi wrote: > On 2023/08/08 7:57, Serge Semin wrote: > > On Mon, Aug 07, 2023 at 09:16:21AM +0900, Kunihiko Hayashi wrote:
> > > According to the dt-bindings, the default value of reg-io-width is 4. > > > However, the value becomes zero when reg-io-width isn't specified.
> > This semantic is implied by the dw_read_io_reg() and dw_write_io_reg() > > methods. It doesn't seem like that much necessary duplicating it in the > > property parse procedure, if not to say - redundant.
> I see. Currently since the variable reg_io_width has no other references > other than dw_{read, write}_io_reg(), it means the default value is taken > if this is zero.
> So, I think we should be careful when actually using the value of > this variable.
It does feel like a sensible robustness improvement, even if it's not fixing a specific issue now it might save us from future issues. [unhandled content-type:application/pgp-signature] | |