From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: <dsterba@suse.cz>
Subject: [PATCH 1/2] btrfs-progs: kerncompat: Fix re-definition of __bitwise
Date: Thu, 16 Mar 2017 11:18:30 +0800 [thread overview]
Message-ID: <20170316031831.28006-1-quwenruo@cn.fujitsu.com> (raw)
In latest linux api headers, __bitwise is already defined in
/usr/include/linux/types.h.
So kerncompat.h will re-define __bitwise, and cause gcc warning.
Fix it by checking if __bitwise is already define.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
The patch is based on devel branch with the following head:
commit 64abe9f619b614e589339046b6c45dfb8fa8e2a9
Author: David Sterba <dsterba@suse.com>
Date: Wed Mar 15 12:28:16 2017 +0100
btrfs-progs: tests: misc/019, use fssum
---
kerncompat.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kerncompat.h b/kerncompat.h
index 958bea43..fa96715f 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -317,11 +317,13 @@ static inline void assert_trace(const char *assertion, const char *filename,
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
+#ifndef __bitwise
#ifdef __CHECKER__
#define __bitwise __bitwise__
#else
#define __bitwise
-#endif
+#endif /* __CHECKER__ */
+#endif /* __bitwise */
/* Alignment check */
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
--
2.12.0
next reply other threads:[~2017-03-16 3:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 3:18 Qu Wenruo [this message]
2017-03-16 3:18 ` [PATCH 2/2] btrfs-progs: convert: Make btrfs_reserved_ranges const Qu Wenruo
2017-03-16 16:33 ` David Sterba
2017-03-17 0:35 ` Qu Wenruo
2017-03-27 13:39 ` David Sterba
2017-03-27 17:37 ` [PATCH 1/2] btrfs-progs: kerncompat: Fix re-definition of __bitwise David Sterba
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=20170316031831.28006-1-quwenruo@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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 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.