aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-add.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2024-08-01 16:43:03 -0700
committerGuenter Roeck <linux@roeck-us.net>2024-08-30 08:34:23 -0700
commit2bb476524c61f43e6e89aeacaee6599ce5dd3505 (patch)
treeac7191885694a67e7738089b096bffbe1ed8e283 /lib/crypto/mpi/mpi-add.c
parent232177a37b90d76d3616f28fb47636d81c02fe8b (diff)
hwmon: (ina2xx) Mark regmap_config as const
Recent versions of checkpatch complain that struct regmap_config should be declared as const. WARNING: struct regmap_config should normally be const Doing so reveals a potential problem in the driver: If both supported chips are present in a single system, the maximum number of registers may race when devices are instantiated since max_registers is updated in the probe function. Solve the problem by setting .max_registers to the maximum register address of all supported chips. This does not make a practical difference while fixing the potential race condition and reducing code complexity. Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions