summaryrefslogtreecommitdiffstats
path: root/Documentation/device-mapper/dm-crypt.txt
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-11-18 23:28:00 +0100
committerMike Snitzer <snitzer@redhat.com>2016-12-08 20:13:08 +0100
commit6080758d441acd7765314f3e9b6ca843e18e9a68 (patch)
treeed5a796823ccb7e039b209d7e88a550d3fd74e8f /Documentation/device-mapper/dm-crypt.txt
parentdm rq: simplify use_blk_mq initialization (diff)
downloadlinux-6080758d441acd7765314f3e9b6ca843e18e9a68.tar.xz
linux-6080758d441acd7765314f3e9b6ca843e18e9a68.zip
dm ioctl: use offsetof() instead of open-coding it
Subtracting sizes is a fragile approach because the result is only correct if the compiler has not added any padding at the end of the structure. Hence use offsetof() instead of size subtraction. An additional advantage of offsetof() is that it makes the intent more clear. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'Documentation/device-mapper/dm-crypt.txt')
0 files changed, 0 insertions, 0 deletions