* [PATCH] netfilter: xt_quota: Don't use aligned attribute in sizeof
@ 2018-10-06 23:33 Nathan Chancellor
2018-10-08 22:20 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-10-06 23:33 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal
Cc: netfilter-devel, coreteam, netdev, linux-kernel, Nathan Chancellor
Clang warns:
net/netfilter/xt_quota.c:47:44: warning: 'aligned' attribute ignored
when parsing type [-Wignored-attributes]
BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64));
^~~~~~~~~~~~~
Use 'sizeof(__u64)' instead, as the alignment doesn't affect the size
of the type.
Fixes: e9837e55b020 ("netfilter: xt_quota: fix the behavior of xt_quota module")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
net/netfilter/xt_quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index 6afa7f468a73..fceae245eb03 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -44,7 +44,7 @@ static int quota_mt_check(const struct xt_mtchk_param *par)
{
struct xt_quota_info *q = par->matchinfo;
- BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64));
+ BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__u64));
if (q->flags & ~XT_QUOTA_MASK)
return -EINVAL;
--
2.19.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter: xt_quota: Don't use aligned attribute in sizeof
2018-10-06 23:33 [PATCH] netfilter: xt_quota: Don't use aligned attribute in sizeof Nathan Chancellor
@ 2018-10-08 22:20 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2018-10-08 22:20 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Jozsef Kadlecsik, Florian Westphal, netfilter-devel, coreteam,
netdev, linux-kernel
On Sat, Oct 06, 2018 at 04:33:31PM -0700, Nathan Chancellor wrote:
> Clang warns:
>
> net/netfilter/xt_quota.c:47:44: warning: 'aligned' attribute ignored
> when parsing type [-Wignored-attributes]
> BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64));
> ^~~~~~~~~~~~~
>
> Use 'sizeof(__u64)' instead, as the alignment doesn't affect the size
> of the type.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-08 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-06 23:33 [PATCH] netfilter: xt_quota: Don't use aligned attribute in sizeof Nathan Chancellor
2018-10-08 22:20 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).