diff options
author | Joe Perches <joe@perches.com> | 2012-02-19 19:52:38 -0800 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 09:04:01 -0800 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/sc/message.c | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff) | |
download | op-kernel-dev-475be4d85a274d0961593db41cf85689db1d583c.zip op-kernel-dev-475be4d85a274d0961593db41cf85689db1d583c.tar.gz |
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style.
Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.
Done with emacs and some scripts and some typing.
Built x86 allyesconfig.
No detected change in objdump -d or size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/sc/message.c')
-rw-r--r-- | drivers/isdn/sc/message.c | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/drivers/isdn/sc/message.c b/drivers/isdn/sc/message.c index 0b4c4f1..9679a19 100644 --- a/drivers/isdn/sc/message.c +++ b/drivers/isdn/sc/message.c @@ -25,7 +25,7 @@ /* * receive a message from the board */ -int receivemessage(int card, RspMessage *rspmsg) +int receivemessage(int card, RspMessage *rspmsg) { DualPortMemory *dpm; unsigned long flags; @@ -34,9 +34,9 @@ int receivemessage(int card, RspMessage *rspmsg) pr_debug("Invalid param: %d is not a valid card id\n", card); return -EINVAL; } - + pr_debug("%s: Entered receivemessage\n", - sc_adapter[card]->devicename); + sc_adapter[card]->devicename); /* * See if there are messages waiting @@ -47,47 +47,47 @@ int receivemessage(int card, RspMessage *rspmsg) */ spin_lock_irqsave(&sc_adapter[card]->lock, flags); outb((sc_adapter[card]->shmem_magic >> 14) | 0x80, - sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); + sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); dpm = (DualPortMemory *) sc_adapter[card]->rambase; - memcpy_fromio(rspmsg, &(dpm->rsp_queue[dpm->rsp_tail]), - MSG_LEN); - dpm->rsp_tail = (dpm->rsp_tail+1) % MAX_MESSAGES; + memcpy_fromio(rspmsg, &(dpm->rsp_queue[dpm->rsp_tail]), + MSG_LEN); + dpm->rsp_tail = (dpm->rsp_tail + 1) % MAX_MESSAGES; inb(sc_adapter[card]->ioport[FIFO_READ]); spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); /* * Tell the board that the message is received */ pr_debug("%s: Received Message seq:%d pid:%d time:%d cmd:%d " - "cnt:%d (type,class,code):(%d,%d,%d) " - "link:%d stat:0x%x\n", - sc_adapter[card]->devicename, - rspmsg->sequence_no, - rspmsg->process_id, - rspmsg->time_stamp, - rspmsg->cmd_sequence_no, - rspmsg->msg_byte_cnt, - rspmsg->type, - rspmsg->class, - rspmsg->code, - rspmsg->phy_link_no, - rspmsg->rsp_status); + "cnt:%d (type,class,code):(%d,%d,%d) " + "link:%d stat:0x%x\n", + sc_adapter[card]->devicename, + rspmsg->sequence_no, + rspmsg->process_id, + rspmsg->time_stamp, + rspmsg->cmd_sequence_no, + rspmsg->msg_byte_cnt, + rspmsg->type, + rspmsg->class, + rspmsg->code, + rspmsg->phy_link_no, + rspmsg->rsp_status); return 0; } return -ENOMSG; } - + /* * send a message to the board */ int sendmessage(int card, unsigned int procid, - unsigned int type, - unsigned int class, + unsigned int type, + unsigned int class, unsigned int code, - unsigned int link, - unsigned int data_len, - unsigned int *data) + unsigned int link, + unsigned int data_len, + unsigned int *data) { DualPortMemory *dpm; ReqMessage sndmsg; @@ -102,15 +102,15 @@ int sendmessage(int card, * Make sure we only send CEPID messages when the engine is up * and CMPID messages when it is down */ - if(sc_adapter[card]->EngineUp && procid == CMPID) { + if (sc_adapter[card]->EngineUp && procid == CMPID) { pr_debug("%s: Attempt to send CM message with engine up\n", - sc_adapter[card]->devicename); + sc_adapter[card]->devicename); return -ESRCH; } - if(!sc_adapter[card]->EngineUp && procid == CEPID) { + if (!sc_adapter[card]->EngineUp && procid == CEPID) { pr_debug("%s: Attempt to send CE message with engine down\n", - sc_adapter[card]->devicename); + sc_adapter[card]->devicename); return -ESRCH; } @@ -142,39 +142,39 @@ int sendmessage(int card, */ spin_lock_irqsave(&sc_adapter[card]->lock, flags); outb((sc_adapter[card]->shmem_magic >> 14) | 0x80, - sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); + sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); dpm = (DualPortMemory *) sc_adapter[card]->rambase; /* Fix me */ - memcpy_toio(&(dpm->req_queue[dpm->req_head]),&sndmsg,MSG_LEN); - dpm->req_head = (dpm->req_head+1) % MAX_MESSAGES; + memcpy_toio(&(dpm->req_queue[dpm->req_head]), &sndmsg, MSG_LEN); + dpm->req_head = (dpm->req_head + 1) % MAX_MESSAGES; outb(sndmsg.sequence_no, sc_adapter[card]->ioport[FIFO_WRITE]); spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); - + pr_debug("%s: Sent Message seq:%d pid:%d time:%d " - "cnt:%d (type,class,code):(%d,%d,%d) " - "link:%d\n ", - sc_adapter[card]->devicename, - sndmsg.sequence_no, - sndmsg.process_id, - sndmsg.time_stamp, - sndmsg.msg_byte_cnt, - sndmsg.type, - sndmsg.class, - sndmsg.code, - sndmsg.phy_link_no); - + "cnt:%d (type,class,code):(%d,%d,%d) " + "link:%d\n ", + sc_adapter[card]->devicename, + sndmsg.sequence_no, + sndmsg.process_id, + sndmsg.time_stamp, + sndmsg.msg_byte_cnt, + sndmsg.type, + sndmsg.class, + sndmsg.code, + sndmsg.phy_link_no); + return 0; } int send_and_receive(int card, - unsigned int procid, - unsigned char type, - unsigned char class, - unsigned char code, - unsigned char link, - unsigned char data_len, - unsigned char *data, - RspMessage *mesgdata, - int timeout) + unsigned int procid, + unsigned char type, + unsigned char class, + unsigned char code, + unsigned char link, + unsigned char data_len, + unsigned char *data, + RspMessage *mesgdata, + int timeout) { int retval; int tries; @@ -185,12 +185,12 @@ int send_and_receive(int card, } sc_adapter[card]->want_async_messages = 1; - retval = sendmessage(card, procid, type, class, code, link, - data_len, (unsigned int *) data); - + retval = sendmessage(card, procid, type, class, code, link, + data_len, (unsigned int *) data); + if (retval) { pr_debug("%s: SendMessage failed in SAR\n", - sc_adapter[card]->devicename); + sc_adapter[card]->devicename); sc_adapter[card]->want_async_messages = 0; return -EIO; } @@ -199,7 +199,7 @@ int send_and_receive(int card, /* wait for the response */ while (tries < timeout) { schedule_timeout_interruptible(1); - + pr_debug("SAR waiting..\n"); /* @@ -214,14 +214,14 @@ int send_and_receive(int card, * Got it! */ pr_debug("%s: Got ASYNC message\n", - sc_adapter[card]->devicename); + sc_adapter[card]->devicename); memcpy(mesgdata, &(sc_adapter[card]->async_msg), - sizeof(RspMessage)); + sizeof(RspMessage)); sc_adapter[card]->want_async_messages = 0; return 0; } - tries++; + tries++; } pr_debug("%s: SAR message timeout\n", sc_adapter[card]->devicename); |