aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-14 15:10:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-14 15:10:10 -0700
commitf261c4e529dac5608a604d3dd3ae1cd2adf23c89 (patch)
tree5e73077db2d1bd0011531941c2cb4cd65aeab78a /include/linux
parentMerge tag 'acpi-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
parentinclude/linux/swap.h: use offsetof() instead of custom __swapoffset macro (diff)
downloadlinux-dev-f261c4e529dac5608a604d3dd3ae1cd2adf23c89.tar.xz
linux-dev-f261c4e529dac5608a604d3dd3ae1cd2adf23c89.zip
Merge branch 'akpm' (patches from Andrew)
Merge misc patches from Andrew Morton: - a little bit more MM - a few fixups [ The "little bit more MM" is actually just one of the three patches Andrew sent for mm/filemap.c, I'm still mulling over two more of them from Josef Bacik - Linus ] * emailed patches from Andrew Morton <akpm@linux-foundation.org>: include/linux/swap.h: use offsetof() instead of custom __swapoffset macro tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind zram: default to lzo-rle instead of lzo filemap: pass vm_fault to the mmap ra helpers
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/swap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index fc50e21b3b88..4bfb5c4ac108 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -157,9 +157,9 @@ struct swap_extent {
/*
* Max bad pages in the new format..
*/
-#define __swapoffset(x) ((unsigned long)&((union swap_header *)0)->x)
#define MAX_SWAP_BADPAGES \
- ((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int))
+ ((offsetof(union swap_header, magic.magic) - \
+ offsetof(union swap_header, info.badpages)) / sizeof(int))
enum {
SWP_USED = (1 << 0), /* is slot in swap_info[] used? */