]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: dream: smd: smd_qmi: fix code style issues
authorChihau Chau <chihau@gmail.com>
Thu, 15 Apr 2010 21:01:37 +0000 (17:01 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:35:45 +0000 (11:35 -0700)
This fixes some code style issues detected with the checkpatch.pl
script, like not necessary braces {} in some if and else statements and
include a KERN_INFO facility level in a printk() function.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/dream/smd/smd_qmi.c

index 9e9067fb271b9617ba248ee605156d3a7d839b14..76fce5142d9e5533f1987cd0f5e4ba2126434104 100644 (file)
@@ -211,11 +211,10 @@ static int qmi_send(struct qmi_ctxt *ctxt, struct qmi_msg *msg)
 
        qmi_dump_msg(msg, "send");
 
-       if (msg->service == QMI_CTL) {
+       if (msg->service == QMI_CTL)
                hlen = QMUX_HEADER - 1;
-       } else {
+       else
                hlen = QMUX_HEADER;
-       }
 
        /* QMUX length is total header + total payload - IFC selector */
        len = hlen + msg->size - 1;
@@ -248,11 +247,10 @@ static int qmi_send(struct qmi_ctxt *ctxt, struct qmi_msg *msg)
        /* len + 1 takes the interface selector into account */
        r = smd_write(ctxt->ch, msg->tlv - hlen, len + 1);
 
-       if (r != len) {
+       if (r != len)
                return -1;
-       } else {
+       else
                return 0;
-       }
 }
 
 static void qmi_process_ctl_msg(struct qmi_ctxt *ctxt, struct qmi_msg *msg)
@@ -376,7 +374,7 @@ static void qmi_process_broadcast_wds_msg(struct qmi_ctxt *ctxt,
 static void qmi_process_wds_msg(struct qmi_ctxt *ctxt,
                                struct qmi_msg *msg)
 {
-       printk("wds: %04x @ %02x\n", msg->type, msg->client_id);
+       printk(KERN_INFO "wds: %04x @ %02x\n", msg->type, msg->client_id);
        if (msg->client_id == ctxt->wds_client_id) {
                qmi_process_unicast_wds_msg(ctxt, msg);
        } else if (msg->client_id == 0xff) {
@@ -504,9 +502,8 @@ static void qmi_notify(void *priv, unsigned event)
        case SMD_EVENT_DATA: {
                int sz;
                sz = smd_cur_packet_size(ctxt->ch);
-               if ((sz > 0) && (sz <= smd_read_avail(ctxt->ch))) {
+               if ((sz > 0) && (sz <= smd_read_avail(ctxt->ch)))
                        queue_work(qmi_wq, &ctxt->read_work);
-               }
                break;
        }
        case SMD_EVENT_OPEN: