Skip to content

Commit

Permalink
[PATCH] isdn4linux: Siemens Gigaset drivers: remove IFNULL macros
Browse files Browse the repository at this point in the history
With Hansjoerg Lipp <hjlipp@web.de>

Remove the IFNULL debugging macros from the Gigaset drivers.

Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Tilman Schmidt authored and Linus Torvalds committed Apr 11, 2006
1 parent b1d4746 commit d48c778
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 256 deletions.
27 changes: 6 additions & 21 deletions drivers/isdn/gigaset/asyncdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,14 @@ static inline int hdlc_loop(unsigned char c, unsigned char *src, int numbytes,
{
struct cardstate *cs = inbuf->cs;
struct bc_state *bcs = inbuf->bcs;
int inputstate;
__u16 fcs;
struct sk_buff *skb;
int inputstate = bcs->inputstate;
__u16 fcs = bcs->fcs;
struct sk_buff *skb = bcs->skb;
unsigned char error;
struct sk_buff *compskb;
int startbytes = numbytes;
int l;

IFNULLRETVAL(bcs, numbytes);
inputstate = bcs->inputstate;
fcs = bcs->fcs;
skb = bcs->skb;
IFNULLRETVAL(skb, numbytes);

if (unlikely(inputstate & INS_byte_stuff)) {
inputstate &= ~INS_byte_stuff;
goto byte_stuff;
Expand Down Expand Up @@ -292,15 +286,10 @@ static inline int iraw_loop(unsigned char c, unsigned char *src, int numbytes,
{
struct cardstate *cs = inbuf->cs;
struct bc_state *bcs = inbuf->bcs;
int inputstate;
struct sk_buff *skb;
int inputstate = bcs->inputstate;
struct sk_buff *skb = bcs->skb;
int startbytes = numbytes;

IFNULLRETVAL(bcs, numbytes);
inputstate = bcs->inputstate;
skb = bcs->skb;
IFNULLRETVAL(skb, numbytes);

for (;;) {
/* add character */
inputstate |= INS_have_data;
Expand Down Expand Up @@ -577,11 +566,7 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb, int head, int tail)
*/
int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb)
{
unsigned len;

IFNULLRETVAL(bcs, -EFAULT);
IFNULLRETVAL(skb, -EFAULT);
len = skb->len;
unsigned len = skb->len;

if (bcs->proto2 == ISDN_PROTO_L2_HDLC)
skb = HDLC_Encode(skb, HW_HDR_LEN, 0);
Expand Down
Loading

0 comments on commit d48c778

Please sign in to comment.