Skip to content
Commit 4f16b419 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

device: avoid casting away const from config_info pointer



The driver-specific config_info structure referenced from the device
structure is marked const.  Some drivers fail to preserve that
qualifier when casting the pointer to the driver-specific structure,
violating MISRA 11.8.

Changes produced by scripts/coccinelle/const_config_info.cocci.

Some changes proposed by the script are not included because they
reveal mutation of state through the const pointer, though the
code works as long as the driver-specific object is defined without
the const qualifier.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent 49e8c708
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment