mbox series

[0/2] spi: hisi-kunpeng: Set verification for speed_hz and max_frequency

Message ID 20240730032040.3156393-1-liudingyuan@huawei.com (mailing list archive)
Headers show
Series spi: hisi-kunpeng: Set verification for speed_hz and max_frequency | expand

Message

Devyn Liu July 30, 2024, 3:20 a.m. UTC
The speed_hz is specified by user, while the max_frequency is a
firmware-provided parameter for the SPI controller. Both are used
in the calculation of clk_div. To avoid calculation results outside
of a reasonable range and to prevent division by zero errors,
configuration for validation of speed_hz and max_frequency is added
in the code.

Devyn Liu (2):
  spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
  spi: hisi-kunpeng: Add verification for the max_frequency provided by
    the firmware

 drivers/spi/spi-hisi-kunpeng.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Brown July 30, 2024, 4:03 p.m. UTC | #1
On Tue, 30 Jul 2024 11:20:38 +0800, Devyn Liu wrote:
> The speed_hz is specified by user, while the max_frequency is a
> firmware-provided parameter for the SPI controller. Both are used
> in the calculation of clk_div. To avoid calculation results outside
> of a reasonable range and to prevent division by zero errors,
> configuration for validation of speed_hz and max_frequency is added
> in the code.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
      commit: c3c4f22b7c814a6ee485ce294065836f8ede30fa
[2/2] spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware
      commit: 5127c42c77de18651aa9e8e0a3ced190103b449c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark