summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-11-03 12:52:45 -0400
committerDavid S. Miller <davem@davemloft.net>2017-11-05 08:24:15 -0500
commit28e8c1914a20d020893978b67a6d2c618756bc3f (patch)
tree54ff3a1ec770b8913db4c8571ba91b93ba5ca4e4 /drivers/isdn/mISDN
parent9525d69a36672f9505006b461fb5f7e8f580dfdd (diff)
mISDN: l1oip_core: replace _manual_ swap with swap macro
Make use of the swap macro and remove unnecessary variables skb and cnt. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r--drivers/isdn/mISDN/l1oip_core.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index b5d590e378ac..e3654782a3e2 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -440,14 +440,8 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase,
440 440
441#ifdef REORDER_DEBUG 441#ifdef REORDER_DEBUG
442 if (hc->chan[channel].disorder_flag) { 442 if (hc->chan[channel].disorder_flag) {
443 struct sk_buff *skb; 443 swap(hc->chan[channel].disorder_skb, nskb);
444 int cnt; 444 swap(hc->chan[channel].disorder_cnt, rx_counter);
445 skb = hc->chan[channel].disorder_skb;
446 hc->chan[channel].disorder_skb = nskb;
447 nskb = skb;
448 cnt = hc->chan[channel].disorder_cnt;
449 hc->chan[channel].disorder_cnt = rx_counter;
450 rx_counter = cnt;
451 } 445 }
452 hc->chan[channel].disorder_flag ^= 1; 446 hc->chan[channel].disorder_flag ^= 1;
453 if (nskb) 447 if (nskb)