projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b811d4
)
[DCCP]: Make dccp_delta_seqno return signed numbers
author
Gerrit Renker
<gerrit@erg.abdn.ac.uk>
Tue, 20 Mar 2007 15:45:59 +0000
(12:45 -0300)
committer
David S. Miller
<davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:43 +0000
(22:26 -0700)
Problem:
net/dccp/dccp.h
patch
|
blob
|
blame
|
history
diff --git
a/net/dccp/dccp.h
b/net/dccp/dccp.h
index a2c20a265b25f1eabd9b4eacf0b4884880841ee4..afb313ff216e107e5e1fca38f3dd67382a65b86c 100644
(file)
--- a/
net/dccp/dccp.h
+++ b/
net/dccp/dccp.h
@@
-113,9
+113,12
@@
static inline void dccp_inc_seqno(u64 *seqno)
*seqno = ADD48(*seqno, 1);
}
-static inline u64 dccp_delta_seqno(u64 seqno1, u64 seqno2)
+/* signed mod-2^48 distance: pos. if seqno1 < seqno2, neg. if seqno1 > seqno2 */
+static inline s64 dccp_delta_seqno(const u64 seqno1, const u64 seqno2)
{
- return ((seqno2 << 16) - (seqno1 << 16)) >> 16;
+ u64 delta = SUB48(seqno2, seqno1);
+
+ return TO_SIGNED48(delta);
}
/* is seq1 < seq2 ? */