From: Danny Kukawka <danny.kukawka@bisect.de>
To: drbd-dev@lists.linbit.com
Cc: Danny Kukawka <dkukawka@suse.de>,
drbd-user@lists.linbit.com, linux-kernel@vger.kernel.org,
Philipp Reisner <phil@linbit.com>,
Lars Ellenberg <lars@linbit.com>
Subject: [PATCH] drbd: fix -Waddress warning
Date: Fri, 10 Feb 2012 18:03:53 +0100 [thread overview]
Message-ID: <1328893433-28017-1-git-send-email-danny.kukawka@bisect.de> (raw)
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
reply other threads:[~2012-02-10 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328893433-28017-1-git-send-email-danny.kukawka@bisect.de \
--to=danny.kukawka@bisect.de \
--cc=dkukawka@suse.de \
--cc=drbd-dev@lists.linbit.com \
--cc=drbd-user@lists.linbit.com \
--cc=lars@linbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phil@linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®