* [PATCH] tipc endianness annotations
@ 2008-04-27 5:40 Al Viro
2008-04-27 5:42 ` David Miller
2008-04-27 5:42 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Al Viro @ 2008-04-27 5:40 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, netdev
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
net/tipc/msg.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 6ad070d..ad487e8 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -70,10 +70,9 @@ static inline void msg_set_bits(struct tipc_msg *m, u32 w,
u32 pos, u32 mask, u32 val)
{
val = (val & mask) << pos;
- val = htonl(val);
- mask = htonl(mask << pos);
- m->hdr[w] &= ~mask;
- m->hdr[w] |= val;
+ mask = mask << pos;
+ m->hdr[w] &= ~htonl(mask);
+ m->hdr[w] |= htonl(val);
}
/*
--
1.5.3.GIT
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc endianness annotations
2008-04-27 5:40 [PATCH] tipc endianness annotations Al Viro
@ 2008-04-27 5:42 ` David Miller
2008-04-27 5:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-04-27 5:42 UTC (permalink / raw)
To: viro; +Cc: linux-kernel, netdev
From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Sun, 27 Apr 2008 06:40:21 +0100
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Applied, thanks Al.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc endianness annotations
2008-04-27 5:40 [PATCH] tipc endianness annotations Al Viro
2008-04-27 5:42 ` David Miller
@ 2008-04-27 5:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-04-27 5:42 UTC (permalink / raw)
To: viro; +Cc: linux-kernel, netdev
From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Sun, 27 Apr 2008 06:40:21 +0100
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Applied, thanks Al.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-27 5:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 5:40 [PATCH] tipc endianness annotations Al Viro
2008-04-27 5:42 ` David Miller
2008-04-27 5:42 ` David Miller
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).