[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab5b9153-5031-4a54-9966-d0eddd3e76a1@sirena.org.uk>
Date: Fri, 16 Jun 2023 23:02:51 +0100
From: Mark Brown <broonie@...nel.org>
To: Russ Weight <russell.h.weight@...el.com>
Cc: Jim Wylder <jwylder@...gle.com>,
"Gerlach, Matthew" <matthew.gerlach@...ux.intel.com>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [BUG] _regmap_raw_write() - divide-by-zero
On Fri, Jun 16, 2023 at 02:58:24PM -0700, Russ Weight wrote:
> > + size_t max_data = map->max_raw_write - map->format.reg_bytes -
> > + map->format.pad_bytes;
> For the SPI-Avalon implementation, the values used to calculate max_data are:
> regmap->max_raw_write = 4
> regmap->format->reg_bytes = 4
> regmap->format->pad_bytes = 0
>
> So the above calculation for max_data is: max_data = (4 - 4 - 0) = 0
How does this bus work? The device can accept a maximum of 4 bytes of
data but the register is 4 bytes in length so there's no space to
transmit a value.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists