Re: [PATCH v3 1/9] i2c-mlxbf.c: Fix frequency calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 08, 2022 at 01:35:36PM -0400, Asmaa Mnebhi wrote:
> The i2c-mlxbf.c driver is currently broken because there is a bug
> in the calculation of the frequency. core_f, core_r and core_od
> are components read from hardware registers and are used to
> compute the frequency used to compute different timing parameters.
> The shifting mechanism used to get core_f, core_r and core_od is
> wrong. Use FIELD_GET to mask and shift the bitfields properly.
> 
> Fixes: b5b5b32081cd206b (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC)
> Reviewed-by: Khalil Blaiech <kblaiech@xxxxxxxxxx>
> Signed-off-by: Asmaa Mnebhi <asmaa@xxxxxxxxxx>

Fails to build:

  CC      drivers/i2c/busses/i2c-mlxbf.o
drivers/i2c/busses/i2c-mlxbf.c:2166:35: error: ‘mlxbf_calculate_freq_from_tyu’ undeclared here (not in a function); did you mean ‘mlxbf_i2c_calculate_freq_from_tyu’?
 2166 |                 .calculate_freq = mlxbf_calculate_freq_from_tyu
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   mlxbf_i2c_calculate_freq_from_tyu
drivers/i2c/busses/i2c-mlxbf.c:2173:35: error: ‘mlxbf_calculate_freq_from_yu’ undeclared here (not in a function); did you mean ‘mlxbf_i2c_calculate_freq_from_yu’?
 2173 |                 .calculate_freq = mlxbf_calculate_freq_from_yu
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   mlxbf_i2c_calculate_freq_from_yu
drivers/i2c/busses/i2c-mlxbf.c:1433:12: error: ‘mlxbf_i2c_calculate_freq_from_yu’ defined but not used [-Werror=unused-function]
 1433 | static u64 mlxbf_i2c_calculate_freq_from_yu(struct mlxbf_i2c_resource *corepll_res)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-mlxbf.c:1403:12: error: ‘mlxbf_i2c_calculate_freq_from_tyu’ defined but not used [-Werror=unused-function]
 1403 | static u64 mlxbf_i2c_calculate_freq_from_tyu(struct mlxbf_i2c_resource *corepll_res)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux