lkml.org 
[lkml]   [2023]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2023-08-08 19:56    [W:0.044 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site