* [PATCH] drbd: fix -Waddress warning
@ 2012-02-10 17:03 Danny Kukawka
0 siblings, 0 replies; only message in thread
From: Danny Kukawka @ 2012-02-10 17:03 UTC (permalink / raw)
To: drbd-dev
Cc: Danny Kukawka, drbd-user, linux-kernel, Philipp Reisner, Lars Ellenberg
Fix for:
drivers/block/drbd/drbd_main.c: In function ‘drbd_buildtag’:
drivers/block/drbd/drbd_main.c:4187:19: warning: the comparison will
always evaluate as ‘true’ for the address of ‘__this_module’ will
never be NULL [-Waddress]
Remove "THIS_MODULE != NULL" check since always true and move else
block to #else.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/block/drbd/drbd_main.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 211fc44..36a51ac 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -4184,11 +4184,10 @@ const char *drbd_buildtag(void)
if (buildtag[0] == 0) {
#ifdef CONFIG_MODULES
- if (THIS_MODULE != NULL)
- sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
- else
+ sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
+#else
+ buildtag[0] = 'b';
#endif
- buildtag[0] = 'b';
}
return buildtag;
--
1.7.7.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-10 17:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 17:03 [PATCH] drbd: fix -Waddress warning Danny Kukawka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.