aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorIan Abbott <[email protected]>2017-03-08 18:44:30 +0000
committerGreg Kroah-Hartman <[email protected]>2017-03-12 14:57:00 +0100
commit7cb1c5c2cd5fe2d4303eee415ca2ed207bd932a5 (patch)
tree48fa1c9da43a44c9dfa2794523db063d94b42440 /lib/netdev-notifier-error-inject.c
parent6fbd1330e50383a8a30f0fc67e690a22b99fd2d5 (diff)
staging: comedi: jr3_pci: check sizes at compile time
The driver currently checks the size of `struct jr3_sensor` is correct when a device is attached, returning an error if it is wrong. Replace that with a compile-time check. We don't care too much about the size of `struct jr3_sensor` as it is embedded in the larger `struct jr3_block` and is followed by a lot of padding. We should care more that the size of `struct jr3_block` is correct, as it describes the overall register layout of a block, and there is an array of such blocks (one per subdevice). Check its size at compile-time using the `BUILD_BUG_ON()` macro. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions