diff options
author | David Lin <dlin@marvell.com> | 2016-06-06 17:57:36 +0800 |
---|---|---|
committer | David Lin <dlin@marvell.com> | 2016-06-06 17:57:36 +0800 |
commit | af294d17374f2acff09b0b8fc64668288b6e1dd4 (patch) | |
tree | 1722c3bf00dcbbec668d94d41294a5992fc211c0 | |
parent | 193594f055103b96f357458ada6b768185ef9e47 (diff) |
Modified the code to pass chackpatch.pl.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r-- | debugfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -255,7 +255,8 @@ static ssize_t mwl_debugfs_sta_read(struct file *file, char __user *ubuf, } len += scnprintf(p + len, size - len, "rx_bw: %d, rx_nss: %d\n", sta->bandwidth, sta->rx_nss); - len += scnprintf(p + len, size - len, "tdls: %d, tdls_init: %d\n", + len += scnprintf(p + len, size - len, + "tdls: %d, tdls_init: %d\n", sta->tdls, sta->tdls_initiator); len += scnprintf(p + len, size - len, "wme: %d, mfp: %d\n", sta->wme, sta->mfp); @@ -382,9 +383,7 @@ static ssize_t mwl_debugfs_tx_desc_write(struct file *file, goto err; } - ret = sscanf(buf, "%d", &tx_desc_num); - - if (ret != 1) { + if (kstrtoint(buf, 0, &tx_desc_num)) { ret = -EINVAL; goto err; } |