drbd: check MODULE for THIS_MODULE
authorCong Wang <xiyou.wangcong@gmail.com>
Tue, 3 Apr 2012 06:13:36 +0000 (14:13 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:42 +0000 (13:34 +0000)
commitb88ca975802fdfc636f36df763628d41a4bd68d4
tree98b654594b4e49bbc6916a9e767a7d5e5865f3ec
parent2e8f41e0a066e6363bbfe0112282839fd55876ec
drbd: check MODULE for THIS_MODULE

commit bc4854bc91c9a7f117437215cd8b16a0a5671d93 upstream.

THIS_MODULE is NULL only when drbd is compiled as built-in,
so the #ifdef CONFIG_MODULES should be #ifdef MODULE instead.

This fixes the warning:

drivers/block/drbd/drbd_main.c: In function ‘drbd_buildtag’:
drivers/block/drbd/drbd_main.c:4187:24: warning: the comparison will always evaluate as ‘true’ for the address of ‘__this_module’ will never be NULL [-Waddress]

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/block/drbd/drbd_main.c