diff options
author | Alexander Potapenko <glider@google.com> | 2017-07-19 20:27:30 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-20 00:33:50 +0200 |
commit | beaec533fc2701a28a4d667f67c9f59c6e4e0d13 (patch) | |
tree | d865dda1b1bf9c50ada3b4a8344aba60186c42fe /include/drm/drm_crtc_helper.h | |
parent | Merge tag 'gcc-plugins-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-beaec533fc2701a28a4d667f67c9f59c6e4e0d13.tar.xz linux-beaec533fc2701a28a4d667f67c9f59c6e4e0d13.zip |
llist: clang: introduce member_address_is_nonnull()
Currently llist_for_each_entry() and llist_for_each_entry_safe() iterate
until &pos->member != NULL. But when building the kernel with Clang,
the compiler assumes &pos->member cannot be NULL if the member's offset
is greater than 0 (which would be equivalent to the object being
non-contiguous in memory). Therefore the loop condition is always true,
and the loops become infinite.
To work around this, introduce the member_address_is_nonnull() macro,
which casts object pointer to uintptr_t, thus letting the member pointer
to be NULL.
Signed-off-by: Alexander Potapenko <glider@google.com>
Tested-by: Sodagudi Prasad <psodagud@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/drm/drm_crtc_helper.h')
0 files changed, 0 insertions, 0 deletions