gadget: f_thor: add missing line breaks for pr_err() 77/231777/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 13 Feb 2020 08:24:11 +0000 (17:24 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 24 Apr 2020 06:19:10 +0000 (15:19 +0900)
After the commit 9b643e312d52 ("treewide: replace with error()
with pr_err()"), there are pr_err() usages without line break. Add
missing line breaks for pr_err() used in f_thor.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: cherry-pick mainline commit 491cabf067c6 to fix error message]

Change-Id: If1750e46cb3e9d64d5c9460d82c7fd90f7a58acd

drivers/usb/gadget/f_thor.c

index 9ac4235..f215a9e 100644 (file)
@@ -182,7 +182,7 @@ static int download_head(unsigned long long total,
                                        transfer_buffer, THOR_STORE_UNIT_SIZE,
                                        (*cnt)++);
                        if (ret) {
-                               pr_err("DFU write failed [%d] cnt: %d",
+                               pr_err("DFU write failed [%d] cnt: %d\n",
                                      ret, *cnt);
                                return ret;
                        }
@@ -232,7 +232,7 @@ static int download_tail(long long int left, int cnt)
 
        transfer_buffer = dfu_get_buf(dfu_entity);
        if (!transfer_buffer) {
-               pr_err("Transfer buffer not allocated!");
+               pr_err("Transfer buffer not allocated!\n");
                return -ENXIO;
        }
 
@@ -247,7 +247,7 @@ static int download_tail(long long int left, int cnt)
        if (left) {
                ret = dfu_write(dfu_entity, transfer_buffer, left, cnt++);
                if (ret) {
-                       pr_err("DFU write failed [%d]: left: %llu", ret, left);
+                       pr_err("DFU write failed[%d]: left: %llu\n", ret, left);
                        return ret;
                }
        }
@@ -261,7 +261,7 @@ static int download_tail(long long int left, int cnt)
         */
        ret = dfu_flush(dfu_entity, transfer_buffer, 0, cnt);
        if (ret)
-               pr_err("DFU flush failed!");
+               pr_err("DFU flush failed!\n");
 
        return ret;
 }
@@ -310,7 +310,7 @@ static int process_rqt_download(const struct rqt_box *rqt)
 
                alt_setting_num = dfu_get_alt(f_name);
                if (alt_setting_num < 0) {
-                       pr_err("Alt setting [%d] to write not found!",
+                       pr_err("Alt setting [%d] to write not found!\n",
                              alt_setting_num);
                        rsp->ack = -ENODEV;
                        ret = rsp->ack;
@@ -336,7 +336,7 @@ static int process_rqt_download(const struct rqt_box *rqt)
                debug("DL EXIT\n");
                break;
        default:
-               pr_err("Operation not supported: %d", rqt->rqt_data);
+               pr_err("Operation not supported: %d\n", rqt->rqt_data);
                ret = -ENOTSUPP;
        }
 
@@ -367,7 +367,7 @@ static int process_data(void)
                puts("RQT: UPLOAD not supported!\n");
                break;
        default:
-               pr_err("unknown request (%d)", rqt->rqt);
+               pr_err("unknown request (%d)\n", rqt->rqt);
        }
 
        return ret;
@@ -567,7 +567,7 @@ static int thor_rx_data(size_t *received)
 
                status = usb_ep_queue(dev->out_ep, dev->out_req, 0);
                if (status) {
-                       pr_err("kill %s:  resubmit %d bytes --> %d",
+                       pr_err("kill %s:  resubmit %d bytes --> %d\n",
                              dev->out_ep->name, dev->out_req->length, status);
                        usb_ep_set_halt(dev->out_ep);
                        return -EAGAIN;
@@ -614,7 +614,7 @@ static void thor_tx_data(unsigned char *data, int len)
 
        status = usb_ep_queue(dev->in_ep, dev->in_req, 0);
        if (status) {
-               pr_err("kill %s:  resubmit %d bytes --> %d",
+               pr_err("kill %s:  resubmit %d bytes --> %d\n",
                      dev->in_ep->name, dev->in_req->length, status);
                usb_ep_set_halt(dev->in_ep);
        }
@@ -647,7 +647,7 @@ static void thor_rx_tx_complete(struct usb_ep *ep, struct usb_request *req)
        case -ESHUTDOWN:                /* disconnect from host */
        case -EREMOTEIO:                /* short read */
        case -EOVERFLOW:
-               pr_err("ERROR:%d", status);
+               pr_err("ERROR:%d\n", status);
                break;
        }
 
@@ -687,7 +687,7 @@ thor_func_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
                break;
 
        default:
-               pr_err("thor_setup: unknown request: %d", ctrl->bRequest);
+               pr_err("thor_setup: unknown request: %d\n", ctrl->bRequest);
        }
 
        if (value >= 0) {
@@ -1057,7 +1057,7 @@ static int thor_func_set_alt(struct usb_function *f,
                debug("Communication Data interface\n");
                result = thor_eps_setup(f);
                if (result)
-                       pr_err("%s: EPs setup failed!", __func__);
+                       pr_err("%s: EPs setup failed!\n", __func__);
                dev->configuration_done = 1;
                break;
        }