863cf332 | 03-Jan-2023 |
Ian Abbott <abbotti@mev.co.uk> |
comedi: check data length for INSN_CONFIG_GET_PWM_OUTPUT
Comedi INSN_CONFIG instructions have different expected instructtion data lengths depending on the type of configuration instruction specifie
comedi: check data length for INSN_CONFIG_GET_PWM_OUTPUT
Comedi INSN_CONFIG instructions have different expected instructtion data lengths depending on the type of configuration instruction specified by the first word of data. This is checked by `check_insn_config_length()`. There are a few configuration instructions whose data lengths are not currently checked, usually for rare configuration instructions that are implemented differently by different drivers. For unknown configuration instructions, the function logs a warning and accepts the specified data length.
The `INSN_CONFIG_GET_PWM_OUTPUT` configuration instruction length is not currently checked, but all the places it is currently used expect a data length of 3. (These places are `ni_get_pwm_config()` in "ni_mio_common.c", and `pci1760_pwm_insn_config()` in "adv_pci1760.c".) Make this length official by checking it in `check_insn_config_length()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20230103151127.19287-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
55d0f80e | 17-Nov-2021 |
Ian Abbott <abbotti@mev.co.uk> |
comedi: ni_routing: tools: Update due to moved COMEDI headers
Building of the tools for converting the NI routing information between CSV files (for maintenance) and C files (for building) was broke
comedi: ni_routing: tools: Update due to moved COMEDI headers
Building of the tools for converting the NI routing information between CSV files (for maintenance) and C files (for building) was broken by the move of the main COMEDI header files to "include/uapi/linux/" and "include/linux/". (These tools are not built as part of the normal kernel build process.) Fix it in the Makefile.
A slight niggle is that `#include <linux/comedi.h>` needs to work when compiling the `convert_c_to_py` program, but it cannot use a `-I` option referring to the "uapi" include directory because that interferes with inclusion of other system headers. So it uses `-I.` and makes a local copy (actually a symbolic link) as "./linux/comedi.h".
Also remove some unneeded cruft such as the `-D"BIT(x)=(1<<(x))"` preprocessor flag.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20211117120604.117740-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|